Jump to content

Gordon_G

Members
  • Posts

    282
  • Joined

  • Last visited

Everything posted by Gordon_G

  1. I know this'll work but, I'll need to do this for all my guiFunc's I would like to be faster
  2. Hello, I've a little problem with the lua unpack function. This is my code : -- CLIENT local loginPanelPos = { ["globalPanel"] = {0,0,557,400} } function showLoginPanel( ) a = guiCreateStaticImage( unpack(loginPanelPos["globalPanel"]), "LOGIN.png", false ) end This is what I'm getting in /debugscript 3 Bad argument @guiCreateStaticImage [Expected number at argument 3, got boolean]
  3. Add this at line 29 guiSetVisible(graphics.window, false)
  4. addEventHandler("onClientMarkerHit" , Marker , markerhit) try to put it at the end of the file, because actually, when you trigger, markerhit is a nil value and Marker too
  5. You never call getUpdates()
  6. You handle a function who is not defined, put the event handler below the function
  7. function getUpdates() local file = "UpdatesLog.txt" local openFile = fileOpen(file) local size = fileGetSize(openFile) if not openFile then outputChatBox("Error loading file") return false end local updates = fileRead(openFile, size+500) fileClose(openFile) triggerClientEvent(client, "getUpdates", client, updates) end It works fine for me when I create logs file for exemple.
  8. Ok, thanks, I did not see the last 3 args. Anyway I did it myself by using : local image = dxCreateTexture( "multiColor.png" ) local white = tocolor(255,255,255,255) addEventHandler("onClientRender", root,function() dxDrawMaterialLine3D( 225,17,3,226.5,18.5,3,image,1.5,white,219.04632568359,19.361221313477,3 ) end) Thanks for your help
  9. Hello, I'm not very strong with the dx elements. I've seen this on wiki for creating a 3D image at a world position : https://wiki.multitheftauto.com/wiki/DxDrawImage3D But, when I move the camera, the image is rotating with it, how can I create a function with no rotation of the image ? Like this, when I move the camera, the image don't move.
  10. Gordon_G

    question

    If you put getRootElement() it ill trigger the client event for everyone, not only for the players who are in the CT team, I do not thing it's what you want to do. You should keep the last code you did, because here, there is no loop, so the execution of the triggerClientEvent can't work. You can not define getRootElement() to take all the players. What @DNL291 said was not in order to modify your code, that was just a right information
  11. Gordon_G

    question

    Yes, it'll work if CT value is goodly a team created in the same resource
  12. Gordon_G

    question

    So, the code above will do this
  13. Gordon_G

    question

    If there a 10 players in CT team alive, it'll trigger the client event 10 times. Want do you want to do exactly ?
  14. Gordon_G

    VipSystem

    isObjectInACLGroup it's a server func' only.
  15. https://wiki.multitheftauto.com/wiki/FindRotation
  16. Gordon_G

    map

    setControlState ( "radar", false ) you'll need this too
  17. Move the fonction gethp to the top
  18. I do not do that to patch a security prob. Juste to reduce lag because I use a lot datas
  19. Oh yes, it is, I did not noticed it, thanks !
  20. Hello, I've read the elementData were not secured, and very slow. So, we can replace it with table, but what could be the better ? This ? datas_ = {} function setPlayerData(player,data,value) datas_[player][data] = value end Or this ? datas_ = {} function setPlayerData(player,data,value) datas_[data][player] = value end
  21. It can not works because "marker1" is created inside the fonction who is handled. You can not handle a marker who do not exist. So, you'll need to create "marker1" before handling it.
  22. It depends when allCpTimes table is defined : print(test) -- print nil test = "try" print(test) -- print try
  23. In order to reduce lag, you should use for i,v in pairs(getAttachedElements(yourProjectileElementHere) do setBlipColor(v,255,0,0,255); end instead of for i,v in ipairs(getAttachedElements(yourProjectileElementHere) do setBlipColor(v,255,0,0,255); end 'Cause you don't need to order the execution.
×
×
  • Create New...