Jump to content

Enargy,

Members
  • Posts

    1,102
  • Joined

Everything posted by Enargy,

  1. why 'setTimer' inside of 'onClientRender'?
  2. EXAMPLE: function theFunction() gui = guiCreateWindow(float x, float y, float z, "EXAMPLE", false) anybutton = guiCreateButton(float x, float y, float z, "CLOSE", false) showCursor(true) addEventHandler ( "onClientGUIClick", anybutton, close, false) end addEventHandler ( "onClientResourceStart", resourceRoot, theFunction) function close() guiSetVisible(gui , false) showCursor(guiGetVisible(gui)) end .
  3. when you add the event into the gui-function check if you have boolean ( boolean is a data type either whose value can be true or false) addEventHandler ( "onClientGUIClick", anybutton, theFunction, false) --- in this case is false.
  4. You cannot remove that, far as i know
  5. maybe you can use some like this for i, v in ipairs(getElementsByType("object")) do local model = getElementModel(v) engineSetModelLODDistance(model, float distance) end
  6. engineSetModelLODDistance ( id, value)
  7. Enargy,

    Help me

    playSound3D("example.mp3", x,y,z, false) --- you have to define x,y,z arguments You have to find an effect of that sound into MP3, WAV, OGG, RIFF, MOD, XM, IT and S3M format.
  8. change the argument of the line #60 to #66 for this: addEventHandler("onClientMarkerHit", root, function() if isElementWithinMarker(getLocalPlayer(), nMarker) then guiSetVisible(mainWin, true) showCursor(true) end end)
  9. Change 'source' for gui-element. row, col = guiGridListGetSelectedItem ( example.gridlist ) --- line 72
  10. bindKey dxDrawText dxDrawRectangle addEventHandler
  11. try this: showChat removeEventHandler addEventHandler
  12. Enargy,

    Staff image

    try using triggerClientEvent you are using this code in client-side, which should not be and 'v' is not defined like player if (isGuestAccount(getPlayerAccount(v)) == false) then accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then end end
  13. each scripter needs some money, you think?
  14. 'elementDimension' & 'elementInterior' have to be out of function with marker and forgot the 'if' & 'then', and I solved it. basepfs = createMarker(238.62816, 140.98083, 1003.02344, 'cylinder', 1.0, 255, 0, 0, 150) setElementDimension (basepfs, 0) setElementInterior (basepfs, 3) function sairBasePF(player) if isElementWithinMarker(player, basepfs) then outputChatBox("[sERVER] Você saiu da HQ da Polícia Federal", player, 0, 255, 0) setElementPosition (player, x, y, z) setElementInterior (player, 0) end end addEventHandler( "onMarkerHit", basepfs, sairBasePF )
  15. need these two functions to the sound of weapons setAmbientSoundEnabled("gunfire", false) playSound3D("example.mp3", float x, float y, float z) setPlayerHudComponentVisible ( getLocalPlayer(), "crosshair", false ) dxDrawImage() --- or you could also use shader. (would not need the 'setPlayerHudComponentVisible') for the crosshair, perhaps...
  16. Enargy,

    Help!

    you're welcome
  17. Enargy,

    Help!

    server.lua players = getElementsByType("player") addEventHandler("onResourceStart", resourceRoot, function() for index,player in ipairs(players) do bindKey(player, "M","down", sirens) end end) function sirens(player) local veh = getPedOccupiedVehicle(player) if (veh) then addVehicleSirens(veh,1,1) if not getVehicleSirensOn (veh) then outputChatBox("Sirens: ON", player, 0, 255, 0) setVehicleSirensOn (veh, true) else outputChatBox("Sirens: OFF", player, 255, 0, 0) setVehicleSirensOn (veh, false) removeVehicleSirens(veh) end end end
  18. execute all commands with one command or I got misunderstood?
×
×
  • Create New...