Jump to content

Search the Community

Showing results for tags 'lua'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. I think the Title says it all. What dxSetRenderTarget() is used for?And could you give me some example other than on the wiki?
  2. So, friend of mine got this error: Picture He was like: dbConnection was in use, this is why it happened, but i was like: thats impossible, so this is why i ask you guys. btw: This is just a question, and i dont need a script-fix for is, just an answer about it.Thx in advance.
  3. when i driveing the car, then the exhaust fire. where can i download this script?
  4. Hello guys, my name is Unknown-Guy, I am staff of Nexus Games RPG. Nexus Games RPG which is still under development but we have completed the major part of work because we have a a smartphone, jobs, Shops etc but still there are a few bugs and a little work to do, and someone who can look for bugs for free. If you are a beginner developer, you still can help us by joining our team and remember we never would put pressure upon you and we will give you the sufficent time to do work. To contact me, please leave a post below or message me. Thanks Regards The Nexus Games Staff.
  5. i have this code: setTimer(function() local arfolyam = math.random(200,5130) outputChatBox("Jelenlegi árfolyam: "..arfolyam) end, 500, 0) GUIEditor.window[1] = guiCreateWindow(0.35, 0.31, 0.31, 0.28, "Aranykereskedés", true) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(0.02, 0.59, 0.95, 0.14, "Az arany jelenlegi árfolyama: "..arfolyam, true, GUIEditor.window[1]) but i get this error in debugscript 3: attempt to concatenate global 'arfolyam' ( a nil value) what wrong? how to fix this?
  6. The question is the same as the title: how to get width and height of a vehicle component?I dont think that there is any way to do it.
  7. Okey, so im currently working on a repair script for my server, until this point everything worked, but now i need to calculate some offsets(world offset, and rotation offset too), and i have no idea how to do it.So, the basic idea is to hold every demounted component like this.Heres the script i made. --CLIENT SIDE local r = { ["door_lf_dummy"] = {90,0,-90}, ["door_rf_dummy"] = {90,0,-90}, ["door_lr_dummy"] = {90,0,-90}, ["door_rr_dummy"] = {90,0,-90}, } addEvent("addVehComponentToPlayer",true) function funkzson(veh,comp,player) setTimer(function() local rotx,roty,rotz = getElementRotation(player) setElementRotation(veh,rotx,rotx,rotz) for k in pairs(getVehicleComponents(veh)) do if not (k==comp) then setVehicleComponentVisible(veh,k,false) end end local cX,cY,cZ = getVehicleComponentPosition(veh,comp,"world") local vX,vY,vZ = getElementPosition(veh) local offsetX,offsetY,offsetZ = (vX-cX),(vY-cY),(cZ-vZ) exports.bone_attach:attachElementToBone(veh,player,2,0,-0.4,-0.65,r[comp][1],r[comp][2],r[comp][3]) setPedAnimation(player,"carry","crry_prtial",0,false,false,false) end,50,1) end addEventHandler("addVehComponentToPlayer",getLocalPlayer(),funkzson) --SERVER SIDE addCommandHandler("setcompstate",function(source,_,comp) local x,y,z = getElementPosition(source) local veh = createVehicle(440,x,y,z,rotx,roty,rotz) setElementCollisionsEnabled(veh,false) setVehicleDamageProof(veh,true) setElementData(veh,"onlyfixveh",true) triggerClientEvent("addVehComponentToPlayer",root,veh,comp,source) end) Ignore that i attached the server side triggerClientEvent to a command, i made it like this only for testing purposes. btw, maybe i will post the full script as a community script.
  8. i got this error, but the script working fine... -.- bad argument #1 to 'len' (string expected, got boolean) how to fix this? code: function currentSongName() local radio_title = getElementData(resourceRoot, "radio.title") if string.len(radio_title) >= x*0.0625 then radio_title = string.sub(radio_title, 1, 80)..".." end for i, shading in pairs ( offsetShadings ) do dxDrawText("Radio: "..radio_title, xD+shading[1], yD+shading[2], xD, yD+textHeight, tocolor ( 0, 0, 0, 255 ), scale, font, "left", "center", false, false, true, true) end dxDrawText("Radio: #ffffff"..radio_title, xD, yD, xD, yD+textHeight, tocolor ( 70, 215, 0, 255 ), scale, font, "left", "center", false, false, true, true) end addEventHandler('onClientRender', root, currentSongName)
  9. I have a DayZ Gamemode, and at the vehicles are saved in backup.db, but is a problem, because are saved the the destroyed cars, how i can remove that? Code: https://hastebin.com/wohefayeze.lua
  10. In this code, i want to check if is a admin?, because if is a admin i want to be: "[Admin][Global]" function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); for _,v in ipairs(getElementsByType("player")) do outputChatBox("#FF0000[GLOBAL] #FFFFFF"..name..": #FFFFFF"..message,v, 255, 255, 255, true) --00FF00 end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"b", "down", "chatbox", "global"); end end ) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "b", "down", "chatbox", "global"); end )
  11. local movingOffsetX, movingOffsetY = 0, 0 local isMoving = false bindKey('m', 'down', function() showCursor(not isCursorShowing()); end ) function drawRadar() showPlayerHudComponent("radar", false) if disableGTASAhealth then showPlayerHudComponent("health", false) end if disableGTASAarmor then showPlayerHudComponent("armour", false) end if disableGTASAoxygen then showPlayerHudComponent("breath", false) end if (not isPlayerMapVisible()) then if (isCursorShowing() and isMoving) then local cursorX, cursorY = getCursorPosition(); cursorX = cursorX * sx; cursorY = cursorY * sy; xFactor = cursorX - movingOffsetX; yFactor = cursorY - movingOffsetY; end local mW, mH = dxGetMaterialSize(rt) local x, y = getElementPosition(localPlayer) local X, Y = mW/2 -(x/(6000/worldW)), mH/2 +(y/(6000/worldH)) local camX,camY,camZ = getElementRotation(getCamera()) dxSetRenderTarget(rt, true) if alwaysRenderMap or getElementInterior(localPlayer) == 0 then dxDrawRectangle(xFactor, yFactor, worldW, worldH, 0xFF5E656B) dxDrawImage(X - worldW/2, mH/5 + (Y - worldH/2), worldW, worldH, "image/world.jpg", camZ, (x/(6000/worldW)), -(y/(6000/worldH)), tocolor(255, 255, 255, 255)) end dxSetRenderTarget() dxDrawRectangle((10)*xFactor, sy-((200+10))*yFactor, (300)*xFactor, (184)*yFactor, tocolor(0, 0, 0, 175)) dxDrawImage((10+5)*xFactor, sy-((200+5))*yFactor, (300-10)*xFactor, (175)*yFactor, rt, 0, 0, 0, tocolor(255, 255, 255, 255)) local rx, ry, rz = getElementRotation(localPlayer) local lB = (15)*xFactor local rB = (15+290)*xFactor local tB = sy-(205)*yFactor local bB = tB + (175)*yFactor local cX, cY = (rB+lB)/2, (tB+bB)/2 +(35)*yFactor local toLeft, toTop, toRight, toBottom = cX-lB, cY-tB, rB-cX, bB-cY for k, v in ipairs(getElementsByType("blip")) do local bx, by = getElementPosition(v) local actualDist = getDistanceBetweenPoints2D(x, y, bx, by) local maxDist = getBlipVisibleDistance(v) if actualDist <= maxDist and getElementDimension(v)==getElementDimension(localPlayer) and getElementInterior(v)==getElementInterior(localPlayer) then local dist = actualDist/(6000/((worldW+worldH)/2)) local rot = findRotation(bx, by, x, y)-camZ local bpx, bpy = getPointFromDistanceRotation(cX, cY, math.min(dist, math.sqrt(toTop^2 + toRight^2)), rot) local bpx = math.max(lB, math.min(rB, bpx)) local bpy = math.max(tB, math.min(bB, bpy)) local bid = getElementData(v, "customIcon") or getBlipIcon(v) local _, _, _, bcA = getBlipColor(v) local bcR, bcG, bcB = 255, 255, 255 if getBlipIcon(v) == 0 then bcR, bcG, bcB = getBlipColor(v) end local bS = getBlipSize(v) dxDrawImage(bpx -(blip*bS)*xFactor/2, bpy -(blip*bS)*yFactor/2, (blip*bS)*xFactor, (blip*bS)*yFactor, "image/blip/"..bid..".png", 0, 0, 0, tocolor(bcR, bcG, bcB, bcA)) end end if renderNorthBlip then local rot = -camZ+180 local bpx, bpy = getPointFromDistanceRotation(cX, cY, math.sqrt(toTop^2 + toRight^2), rot) --get position local bpx = math.max(lB, math.min(rB, bpx)) local bpy = math.max(tB, math.min(bB, bpy)) --cap position to screen local dist = getDistanceBetweenPoints2D(cX, cY, bpx, bpy) --get distance to the capped position local bpx, bpy = getPointFromDistanceRotation(cX, cY, dist, rot) --re-calculate position based on new distance if bpx and bpy then --if position was obtained successfully local bpx = math.max(lB, math.min(rB, bpx)) local bpy = math.max(tB, math.min(bB, bpy)) --cap position just in case dxDrawImage(bpx -(blip*2)/2, bpy -(blip*2)/2, blip*2, blip*2, "image/blip/4.png", 0, 0, 0) --draw north (4) blip end end dxDrawImage(cX -(blip*2)*xFactor/2, cY -(blip*2)*yFactor/2, (blip*2)*xFactor, (blip*2)*yFactor, "image/player.png", camZ-rz, 0, 0) end end addEventHandler("onClientRender", root, drawRadar) addEventHandler('onClientClick', getRootElement(), function(button, state, cursorX, cursorY) if (not isPlayerMapVisible()) then local cursorX, cursorY = getCursorPosition(); if (button == 'left' and state == 'down') then if (cursorX >= xFactor and cursorX <= xFactor + worldW and cursorY >= yFactor and cursorY <= yFactor + worldH) then isMoving = true; movingOffsetX = cursorX - xFactor; movingOffsetY = cursorY - yFactor; end else isMoving = false; end end end ) No errors/warnings in debugscript 3, what the problem with this?
  12. local movingOffsetX, movingOffsetY = 0, 0 local isMoving = false bindKey('m', 'down', function() showCursor(not isCursorShowing()); end ) function drawRadar() showPlayerHudComponent("radar", false) if disableGTASAhealth then showPlayerHudComponent("health", false) end if disableGTASAarmor then showPlayerHudComponent("armour", false) end if disableGTASAoxygen then showPlayerHudComponent("breath", false) end if (not isPlayerMapVisible()) then if (isCursorShowing() and isMoving) then local cursorX, cursorY = getCursorPosition(); cursorX = cursorX * sx; cursorY = cursorY * sy; xFactor = cursorX - movingOffsetX; yFactor = cursorY - movingOffsetY; end local mW, mH = dxGetMaterialSize(rt) local x, y = getElementPosition(localPlayer) local X, Y = mW/2 -(x/(6000/worldW)), mH/2 +(y/(6000/worldH)) local camX,camY,camZ = getElementRotation(getCamera()) dxSetRenderTarget(rt, true) if alwaysRenderMap or getElementInterior(localPlayer) == 0 then dxDrawRectangle(xFactor, yFactor, worldW, worldH, 0xFF5E656B) dxDrawImage(X - worldW/2, mH/5 + (Y - worldH/2), worldW, worldH, "image/world.jpg", camZ, (x/(6000/worldW)), -(y/(6000/worldH)), tocolor(255, 255, 255, 255)) end dxSetRenderTarget() dxDrawRectangle((10)*xFactor, sy-((200+10))*yFactor, (300)*xFactor, (184)*yFactor, tocolor(0, 0, 0, 175)) dxDrawImage((10+5)*xFactor, sy-((200+5))*yFactor, (300-10)*xFactor, (175)*yFactor, rt, 0, 0, 0, tocolor(255, 255, 255, 255)) local rx, ry, rz = getElementRotation(localPlayer) local lB = (15)*xFactor local rB = (15+290)*xFactor local tB = sy-(205)*yFactor local bB = tB + (175)*yFactor local cX, cY = (rB+lB)/2, (tB+bB)/2 +(35)*yFactor local toLeft, toTop, toRight, toBottom = cX-lB, cY-tB, rB-cX, bB-cY for k, v in ipairs(getElementsByType("blip")) do local bx, by = getElementPosition(v) local actualDist = getDistanceBetweenPoints2D(x, y, bx, by) local maxDist = getBlipVisibleDistance(v) if actualDist <= maxDist and getElementDimension(v)==getElementDimension(localPlayer) and getElementInterior(v)==getElementInterior(localPlayer) then local dist = actualDist/(6000/((worldW+worldH)/2)) local rot = findRotation(bx, by, x, y)-camZ local bpx, bpy = getPointFromDistanceRotation(cX, cY, math.min(dist, math.sqrt(toTop^2 + toRight^2)), rot) local bpx = math.max(lB, math.min(rB, bpx)) local bpy = math.max(tB, math.min(bB, bpy)) local bid = getElementData(v, "customIcon") or getBlipIcon(v) local _, _, _, bcA = getBlipColor(v) local bcR, bcG, bcB = 255, 255, 255 if getBlipIcon(v) == 0 then bcR, bcG, bcB = getBlipColor(v) end local bS = getBlipSize(v) dxDrawImage(bpx -(blip*bS)*xFactor/2, bpy -(blip*bS)*yFactor/2, (blip*bS)*xFactor, (blip*bS)*yFactor, "image/blip/"..bid..".png", 0, 0, 0, tocolor(bcR, bcG, bcB, bcA)) end end if renderNorthBlip then local rot = -camZ+180 local bpx, bpy = getPointFromDistanceRotation(cX, cY, math.sqrt(toTop^2 + toRight^2), rot) --get position local bpx = math.max(lB, math.min(rB, bpx)) local bpy = math.max(tB, math.min(bB, bpy)) --cap position to screen local dist = getDistanceBetweenPoints2D(cX, cY, bpx, bpy) --get distance to the capped position local bpx, bpy = getPointFromDistanceRotation(cX, cY, dist, rot) --re-calculate position based on new distance if bpx and bpy then --if position was obtained successfully local bpx = math.max(lB, math.min(rB, bpx)) local bpy = math.max(tB, math.min(bB, bpy)) --cap position just in case dxDrawImage(bpx -(blip*2)/2, bpy -(blip*2)/2, blip*2, blip*2, "image/blip/4.png", 0, 0, 0) --draw north (4) blip end end dxDrawImage(cX -(blip*2)*xFactor/2, cY -(blip*2)*yFactor/2, (blip*2)*xFactor, (blip*2)*yFactor, "image/player.png", camZ-rz, 0, 0) end end addEventHandler("onClientRender", root, drawRadar) addEventHandler('onClientClick', getRootElement(), function(button, state, cursorX, cursorY) if (not isPlayerMapVisible()) then local cursorX, cursorY = getCursorPosition(); if (button == 'left' and state == 'down') then if (cursorX >= xFactor and cursorX <= xFactor + worldW and cursorY >= yFactor and cursorY <= yFactor + worldH) then isMoving = true; movingOffsetX = cursorX - xFactor; movingOffsetY = cursorY - yFactor; end else isMoving = false; end end end ) why not move the radar? i do not get errors/warnings in debugscript 3 and i don't know what wrong..
  13. Hello! I have made closely an entire faction-system, but i have problems with loops. This client side script is for put the faction members and their properties in one table. menuPlayers = {} for i = 1, #memberUsernames do menuPlayers[i].name = memberUsernames[i] menuPlayers[i].rank = memberRanks[i] menuPlayers[i].status = memberOnline[i] menuPlayers[i].lastlogin = memberLastLogin[i] menuPlayers[i].active = 0 end when i do it like this ^^ i got this error for the rows in the loop: attempt to index field '?' (a nil value) But, when i remove the loop and try it for only the first player, it works: menuPlayers = {} menuPlayers[1].name = memberUsernames[1] menuPlayers[1].rank = memberRanks[1] menuPlayers[1].status = memberOnline[1] menuPlayers[1].lastlogin = memberLastLogin[1] menuPlayers[1].active = 0 Any help? Thanks.
  14. So, yesterday i started to learn how to code in lua and i tried to find some plugin in sublime text 3 to auto complete my code (snippets) but i didn't found nothing so i decided start create a plugin for it so if you wanna help, here's the github of the project Mta snippets Here's the Mta classes Hope you can help
  15. http://imgur.com/a/og3e5 this is the problem, how to fix this? code: local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root, function() local x, y, z = getElementPosition(localPlayer) local location = getZoneName ( x, y, z ) dxDrawImage(screenW * 0.0076, screenH * 0.7300, screenW * 0.2194, screenH * 0.2422, "mapbg.png", 360, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(location, screenW * 0.0965, screenH * 0.7370, screenW * 0.2250, screenH * 0.7567, tocolor(118, 224, 90, 255), 1.00, "default-bold", "left", "center", false, false, true, false, false) end ) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () setPlayerHudComponentVisible( "area_name", false ) end) local sx, sy = guiGetScreenSize() local rt = dxCreateRenderTarget(290, 175) local xFactor, yFactor = sx/1366, sy/768 local yFactor = xFactor function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end; return t; end function getPointFromDistanceRotation(x, y, dist, angle) local a = math.rad(90 - angle); local dx = math.cos(a) * dist; local dy = math.sin(a) * dist; return x+dx, y+dy; end function drawRadar() showPlayerHudComponent("radar", false) if disableGTASAhealth then showPlayerHudComponent("health", false) end if disableGTASAarmor then showPlayerHudComponent("armour", false) end if disableGTASAoxygen then showPlayerHudComponent("breath", false) end if (not isPlayerMapVisible()) then local mW, mH = dxGetMaterialSize(rt) local x, y = getElementPosition(localPlayer) local X, Y = mW/2 -(x/(6000/worldW)), mH/2 +(y/(6000/worldH)) local camX,camY,camZ = getElementRotation(getCamera()) dxSetRenderTarget(rt, true) if alwaysRenderMap or getElementInterior(localPlayer) == 0 then dxDrawRectangle(0, 0, mW, mH, 0xFF5E656B) dxDrawImage(X - worldW/2, mH/5 + (Y - worldH/2), worldW, worldH, "image/world.jpg", camZ, (x/(6000/worldW)), -(y/(6000/worldH)), tocolor(255, 255, 255, 255)) end dxSetRenderTarget() -- dxDrawRectangle((10)*xFactor, sy-((200+10))*yFactor, (300)*xFactor, (200)*yFactor, tocolor(0, 0, 0, 175)) dxDrawImage((10+5)*xFactor, sy-((200+5))*yFactor, (300-10)*xFactor, (175)*yFactor, rt, 0, 0, 0, tocolor(255, 255, 255, 255)) (this not the full code)
  16. So, i want to create a dead system, and i need 1 thing, and that is: cancelling the camera shake effect when the player dies.. And i want to reanimate the player when i use SetElementHealth(...) I already tried setCameraTarget() but not worked.. Thanks in advance.
  17. https://community.multitheftauto.com/index.php?p=resources&s=details&id=3251 I downloaded this script, but when i move a player to jail, he can access the FR GUI, and "escape" from jail. How can i disable FR GUI access from imprisoned peoples?
  18. Idea: Creating a marker on Map "Draqonlife" (gamemode play), which leads you to to another map. In this case "DraqonDocks" (gamemode race). known issues to be ignored: event triggers any marker known issues to be fixed: after gamemode change, the map wont change. Marker.lua : >Creates a marker (works) >Triggers player on entering and leaving any Marker (works) >Starts gamemode race (works) ! Does not start Map ! !! No error when map does not start !! !! ERROR: lobby/ChangeMode.lua:7: attempt to call global 'changeGamemodeMap' (a nil value) !! resourceRoot = getResourceRootElement() function onCurrentResourceStart(Draqonlife) local resourceName = getResourceName(Draqonlife) outputChatBox("Hello and welcome to " .. resourceName .. "!") Marker = createMarker (2860, -2115, 10, "corona", 4.0, 0, 0, 255, 255) -- create Marker end addEventHandler("onResourceStart", resourceRoot, onCurrentResourceStart) //Create Marker function MarkerHit( hitElement, matchingDimension ) local elementType = getElementType( hitElement ) local resource = getResourceFromName ("race") -- | this works, startResource( resource ) -- | really good tho --local resource = getResourceFromName ("DraqonDocks") --startResource( resource ) // If I try to start the map Resource directly after the race resource, // the Map resource wont load up end addEventHandler( "onMarkerHit", root, MarkerHit) //Should start gamemode race (and map) function MarkerLeave( leaveElement,matchingDimension) local elementType = getElementType( leaveElement ) local resource = getResourceFromName ("DraqonDocks") -- |Also not working, server ignores this line, startResource( resource ) -- |as it Ignores this line too. end addEventHandler( "onMarkerLeave", root, MarkerLeave ) ChangeMode.lua > My Idea to fix this problem --Thats why i want to import the mapmanager (or the function changeGamemodeMap) --Sadly I found no useful documentation for my case. --adding <exports.mapmanager:changeGamemodeMap/> to the meta.xml of the scripts didnt work function changeGamemodeMap() changeGamemodeMap("DraqonDocks", "race") -- this doesnt work end addCommandHandler("420", changeGamemodeMap) ___________________________________________________________________________________________ It would be very kind if someone could enlight me and give me a short introduction to using mapmanagers functions properly. Sadly the Mapmanager post in wiki didnt help me too much. If you find a fix for the existing (half working) Marker.lua, then I'd be really glad too I would love to get feedback and already thank everyone
  19. function adminuzi(thePlayer, commandName, ...) for i,v in pairs(getElementsByType( "player" )) do for group, serverGroupName in pairs( names ) do if isGuestAccount( getPlayerAccount( v ) ) then return end if group then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup( group ) then message = table.concat({...}, " ") groupName = names["group"] end end end end outputChatBox("#0088FF["..groupName.."]#d8001f "..getPlayerName(thePlayer)..": "..message,getRootElement(),0,0,0,true) end addCommandHandler("asay", adminuzi) Sometimes working the "asay xy" cmd, sometimes not working. How to fix this bug?
  20. local titles = { "AdminSegéd", "Moderátor", "SzuperModerátor", "Admin", "FőAdmin", "Tulajdonos", "Fejlesztő" } function getPlayerAdminTitle() local text = titles if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then text = "Tulajdonos" elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("FoAdmin")) then text = "FőAdmin" elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Adminseged")) then text = "AdminSegéd" elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("KisAdmin")) then text = "Admin" elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Fejleszto")) then text = "Fejlesztő" elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then text = "Moderátor" end end function getFixedName(player) if isElement(player) then local hisName = getPlayerName(player) if hisName then result = string.gsub(hisName, '#%x%x%x%x%x%x', '') if result then return result end end end end function adminuzi(thePlayer, commandName, ...) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) or isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("FoAdmin")) or isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Adminseged")) or isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("KisAdmin")) or isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Fejleszto")) or isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Moderator")) then if not (...) then outputChatBox("#00FF7F[Használat]:#FFFFFF /".. commandName .." [üzenet]", thePlayer, 0, 206, 209,true) else local adminrang = getPlayerAdminTitle(thePlayer) message = table.concat({...}, " ") local playerName = getFixedName ( thePlayer ) outputChatBox("#0088FF[SUPERFUN-Admin]#d8001f "..playerName..": "..message,getRootElement(),0,0,0,true) end end end addCommandHandler("asay", adminuzi, false, false) i have this script, and i get this warnings/error: How to fix this?
  21. I want add a function to the admintag script, but i don't know how to create. When i type this for example: "asd", the script make this automatically to "Asd". And may add to this function special characters? For example: é,á,ű,ő,ó,ú...etc? Those too replace to big letter sorry for my bad english:(
  22. i want create a cool radar for mta, but i don't know, how to make a radar I do not want blips, just localplayer, and otherplayers blip. how to create? sorry for my very bad english
  23. local image = dxCreateTexture( "tesztkep.jpg" ) local white = tocolor(255,255,255,255) addEventHandler("onClientRender", root,function() dxDrawMaterialLine3D( 2463.71143, -1658.97595, 15.31024,2463.55469, -1651.24609, 15.47028,image,7,white ) end) this is my code, and this is the problem: how to fix this rotation problem?
  24. So, heres my table local twonodes = {"login", "rpteszt"} local thirdnodes = {[twonodes[1]] = {"username","password", "rememberMe"}, [twonodes[2]]={"rpteszt"}} local values = {thirdnodes[twonodes[1]]={"false"}} Seems good, right?Yeah, for u,but not for Lua... ERROR: Loading script failed: loginpanel/loginpanelC:112: '}' expected near '=''
  25. I have this script: dxDrawRectangle(screenW * 0.7549, screenH * 0.6933 - 1 - (33*k), screenW * 0.2347, screenH * 0.0211, tocolor(0, 0, 0, 145), false) dxDrawText(v.text, screenW * 0.7535, screenH * 0.6933 - 1 - (66*k), screenW * 0.9896, screenH * 0.7144, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, true, false) and different resolutions the distance grow, or lessen. Picture: How to fix this problem? I want, that all resulotions distance the same. Thanks the help! And sorry for my very bad english!
×
×
  • Create New...