-
Posts
1,102 -
Joined
Everything posted by Enargy,
-
you're welcome.
-
why 'setTimer' inside of 'onClientRender'?
-
you're welcome.
-
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 .
-
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.
-
You cannot remove that, far as i know
-
maybe you can use some like this for i, v in ipairs(getElementsByType("object")) do local model = getElementModel(v) engineSetModelLODDistance(model, float distance) end
-
engineSetModelLODDistance ( id, value)
-
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.
-
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)
-
What's wrong with this?
-
Change 'source' for gui-element. row, col = guiGridListGetSelectedItem ( example.gridlist ) --- line 72
-
bindKey dxDrawText dxDrawRectangle addEventHandler
-
try this: showChat removeEventHandler addEventHandler
-
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
-
each scripter needs some money, you think?
-
(free)? seriously?
-
'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 )
-
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...
-
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
-
execute all commands with one command or I got misunderstood?