Jump to content

Speak

Members
  • Posts

    57
  • Joined

  • Last visited

Everything posted by Speak

  1. I want to remove only one player v = ... ? players[v_index] = nil ?
  2. players = {} for k,v in ipairs(getElementsByType("player")) do players[#players+1] = v; end how to remove a specific player? players[#players - 1] = v; ? using - does not work
  3. do not use it Backdoor compiled script. general_s.luac
  4. Speak

    image rotation

    (I want to create an image) someone to help me?
  5. Speak

    image rotation

    Can you give me an example in my code? RX: Will set the X point in the screen where the "Moving will be made from" RY: Will set the Y point in the screen where the "Moving will be made from" does not work for me any example?
  6. Speak

    image rotation

    I think nobody will answer how can I rotate a picture in 3d image rotation local sx,sy = guiGetScreenSize(); function lala() dxDrawImage(sx-240,62+(28),sx-sx+230, 56,"img/timeleft.png") end addEventHandler("onClientRender",getRootElement(),lala) you must use dxDrawImage3d ?
  7. I also would like to know more I think you should use shader I noticed that this does not work: float rotationCenterOffsetX = 0, float rotationCenterOffsetY = 0, bool dxDrawImage ( float posX, float posY, float width, float height, mixed image [, float rotation = 0, float rotationCenterOffsetX = 0, float rotationCenterOffsetY = 0, int color = tocolor(255,255,255), bool postGUI = false ] )
  8. my problem was not resolved.
  9. my problem was not resolved.
  10. is already in the script 800x600x32 fixed <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,,
  11. At each resolution the button is in a different place local sx, sy = guiGetScreenSize ( ) local pX, pY = ( sx / 2 - 620 / 2 ), ( sy /1 - 550 / 2 ) local button = guiCreateButton(pX, pY,200,40,"",false); I want to stay in the same place in all resolutions
  12. Speak

    dx edit

    such as dash "|" that flashes within this edit function dxCreateEdit(x,y,width,height,text,relative,parent) if x and y and height and width and text then if relative then if parent then x = x*getElementData(parent,"x") y = y*getElementData(parent,"y") else x = x * sx y = y* sy end end local element = createElement("dxEdit") setElementParent(element,parent or dxRootElement) setElementData(element,"x",x) setElementData(element,"y",y) setElementData(element,"width",width) setElementData(element,"height",height) setElementData(element,"text",text) setElementData(element,"parent",parent) setElementData(element,"state","normal") setElementData(element,"font","default") addEventHandler("onClientDXClick",element,moveCursor) return element else outputDebugString("ERROR: expected arguments are missing (dxCreateEdit)") end end quando clicar na edit aparece um traço como esse "|"
  13. Speak

    port poblem

    I need to add here to open the doors of my server?
  14. table.insert(Objects,{ modelID = tonumber(xmlNodeGetAttribute(p,"model")), posX = tonumber(xmlNodeGetAttribute(p,"posX")), posY = tonumber(xmlNodeGetAttribute(p,"posY")), posZ = tonumber(xmlNodeGetAttribute(p,"posZ")), rotX = tonumber(xmlNodeGetAttribute(p,"rotX")), rotY = tonumber(xmlNodeGetAttribute(p,"rotY")), rotZ = tonumber(xmlNodeGetAttribute(p,"rotZ")) })
  15. I'm getting this error attempt to índex local 'v' a (userdata value) ERROR function playersJoin(player,obj) for i, v in ipairs(obj) do local object = createObject(v.modelID, v.posX, v.posY, v.posZ, v.rotX, v.rotY, v.rotZ) table.insert(objects, object) end end
  16. I made the script below works but only loads a map addEvent("onDownloadingMap", true) addEventHandler("onDownloadingMap", getRootElement(),function() local xml = xmlLoadFile("maptest.map") local messageNodes = xmlNodeGetChildren(xml) for i,node in ipairs(messageNodes) do if xmlNodeGetName(node) == "object" then table.insert(Objects,{ model = tonumber(xmlNodeGetAttribute(node, "model")), posX = tonumber(xmlNodeGetAttribute(node, "posX")), posY = tonumber(xmlNodeGetAttribute(node, "posY")), posZ = tonumber(xmlNodeGetAttribute(node, "posZ")), rotX = tonumber(xmlNodeGetAttribute(node, "rotX")), rotY = tonumber(xmlNodeGetAttribute(node, "rotY")), rotZ = tonumber(xmlNodeGetAttribute(node, "rotZ")) }) end if xmlNodeGetName(node) == "spawnpoint" then table.insert(Spawnpoints,{ vehicle = tonumber(xmlNodeGetAttribute(node, "vehicle")), posX = tonumber(xmlNodeGetAttribute(node, "posX")), posY = tonumber(xmlNodeGetAttribute(node, "posY")), posZ = tonumber(xmlNodeGetAttribute(node, "posZ")), rotX = tonumber(xmlNodeGetAttribute(node, "rotX")), rotY = tonumber(xmlNodeGetAttribute(node, "rotY")), rotZ = tonumber(xmlNodeGetAttribute(node, "rotZ")) }) end end xmlUnloadFile(xml) triggerLatentClientEvent(source,"goDownloadMapDM",100000,false,root,Objects,object) queLixo() end ) thanks for replying @ Castilho
  17. because it does not work I have no errors client function startLoaderMap() outputChatBox("oii") triggerServerEvent("onDownloadingMap",getLocalPlayer()); end addCommandHandler("oie",startLoaderMap) object = {} function goDownloadMap(Objects, object) outputChatBox("OI") for i, v in ipairs(Objects) do local object = createObject(v.model, v.posX, v.posY, v.posZ, v.rotX, v.rotY, v.rotZ) if object then table.insert(Objects, object) end end end addEvent("goDownloadMapDM",true) addEventHandler("goDownloadMapDM",root,goDownloadMap) Server local g_Maps = {}; for k,v in ipairs(getResources()) do if (getResourceInfo(v,"type") == "map") and (getResourceInfo(v,"gamemodes") == "race") and getResourceInfo(v,"name") then local name = getResourceInfo(v,"name") if name then if name:find("[DM]",1,true) then g_Maps[#g_Maps+1] = {getResourceName(v),name,0} end end end end local debug = " DEPURAÇÃO " local debug = outputDebugString("DEBUG OBJECTS".. debug ..--[[Objects ..".. Spawnpoints]]"DEBUG SPAWNPOINTS") local Spawnpoints = {} local Objects = {} addEvent("onDownloadingMap", true) addEventHandler("onDownloadingMap", getRootElement(),function(MapID) local mapName = false MapID = math.random(1,#g_Maps); local mapMeta = xmlLoadFile(":"..mapName.."/meta.xml") local messageNodes = xmlNodeGetChildren(mapMeta) for i,node in ipairs(messageNodes) do if xmlNodeGetName(node) == "object" then table.insert(Objects,{ model = tonumber(xmlNodeGetAttribute(node, "model")), posX = tonumber(xmlNodeGetAttribute(node, "posX")), posY = tonumber(xmlNodeGetAttribute(node, "posY")), posZ = tonumber(xmlNodeGetAttribute(node, "posZ")), rotX = tonumber(xmlNodeGetAttribute(node, "rotX")), rotY = tonumber(xmlNodeGetAttribute(node, "rotY")), rotZ = tonumber(xmlNodeGetAttribute(node, "rotZ")) }) end if xmlNodeGetName(node) == "spawnpoint" then table.insert(Spawnpoints,{ vehicle = tonumber(xmlNodeGetAttribute(node, "vehicle")), posX = tonumber(xmlNodeGetAttribute(node, "posX")), posY = tonumber(xmlNodeGetAttribute(node, "posY")), posZ = tonumber(xmlNodeGetAttribute(node, "posZ")), rotX = tonumber(xmlNodeGetAttribute(node, "rotX")), rotY = tonumber(xmlNodeGetAttribute(node, "rotY")), rotZ = tonumber(xmlNodeGetAttribute(node, "rotZ")) }) end xmlUnloadFile(mapMeta) end triggerLatentClientEvent(source,"goDownloadMapDM",100000,false,root,Objects,object) queLixo() end)
  18. the image does not appear has no more errors
  19. anyway thanks. I expect more answers
×
×
  • Create New...