-
Posts
1,102 -
Joined
Everything posted by Enargy,
-
Check it out triggerEvent.
-
Try removing 'thePlayer' from timerr[thePlayer]
-
let me check your code where files are replaced.
-
I am not an expert moddeler but within a DFF file is added an image to the TXD file can load. on the other side check that the script itself or the meta file not have any error. I dont know if you could understand.
-
client function giveCisterna() local vehicle = getPedOccupiedVehicle(getLocalPlayer()) if vehicle and tirpetrol[getElementModel(vehicle)] then triggerServerEvent ( "spawnCisterna", resourceRoot ) end end server local tirpetrol = { [514]=true} function giveCisterna() local vehicle = getPedOccupiedVehicle(client) local x, y, z = getElementPosition(vehicle) local rotX, rotY, rotZ = getElementRotation(vehicle) if vehicle and getVehicleController(vehicle) == client and tirpetrol[getElementModel(vehicle)] then trailer = createVehicle ( 584, x+4, y+1, z, rotX, rotY, rotZ ) attachTrailerToVehicle ( vehicle, trailer ) else if isElement(trailer) then return end end end addEvent("spawnCisterna", true) addEventHandler("spawnCisterna", getRootElement(), giveCisterna) addEventHandler("onVehicleExit", getRootElement(), function() if isElement(trailer) then destroyElement(trailer) outputChatBox("was created", source) else return end end )
-
dxDrawText("Admin OnDut", sx-2, sy-232, sx, sy, tocolor(0, 255, 0, 200), fontbig, "default-bold", "center")
-
the code works perfectly. are you sure that the script is serverside? check meta file
-
As fair I know, insert serial into a table and use getPlayerSerial and onPlayerCommand
-
the function called sirens use triggerClientEvent instead of setVehicleSirensOn and add in the clientside playSound3D and stopSound
-
getElementPosition getPedOccupiedVehicle attachElementToElement triggerClientEvent getLocalPlayer playSound3D bindKey
-
No problem.
-
My wrong, sorry. replace server-side to: -- SERVER.LUA local greenzone = createColRectangle ( -1997, 239, 110, 80 ) local greenzonemaparea = createRadarArea (-1997, 239, 110, 80, 0, 255, 0, 120) function greenzoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", false ) toggleControl ( thePlayer, "previous_weapon", false ) setPedWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) triggerClientEvent( thePlayer, "onPlayerGodmodeEnable", thePlayer ) end addEventHandler ( "onColShapeHit", greenzone, greenzoneEnter ) function greenzoneExit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) toggleControl ( thePlayer, "vehicle_fire", true ) toggleControl ( thePlayer, "vehicle_secondary_fire", true ) triggerClientEvent( thePlayer, "onPlayerGodmodeDisable", thePlayer ) end addEventHandler ( "onColShapeLeave", greenzone, greenzoneExit )
-
try using getLocalPlayer() instead of Ped
-
try this: -- CLIENTSIDE local myFont = dxCreateFont( "font/Oswald.ttf", 30 ) sName = "" addEvent("onClientPlayerJoinn", true) function timer(servername) sName = tostring(servername) end addEventHandler("onClientPlayerJoinn", root, timer) function tela_Carregando() local x, y = guiGetScreenSize () sx = x sy = y + 400 dxDrawText( sName.." Loading...", x/2-230, sy*0.2+50, 500, 25, tocolor(255,255,255), 1, "arial" ) end addEventHandler( "onClientRender", root, tela_Carregando) function lol( startedRes ) if getResourcerName(startedRes) == "GM" then removeEventHandler( "onClientRender", root, tela_Carregando) end end --SERVERSIDE function join () local serverName = getServerName() setTimer(triggerClientEvent, 3000, 1, source, "onClientPlayerJoinn", source, serverName ) setCameraMatrix(source, 1234.0230712891, 43.429969787598, 65.919090270996, 1468.388671875, -918.42474365234, 99.881813049316) end addEventHandler ( "onPlayerJoin", root, join )
-
getServerName() works in server-side, not client-side.
-
Hopefully I'll upload them tomorrow, I am too much tired right now, so I'll go to sleep now. Are you drunk?
-
post your code
-
change second code; line #14 and #15: local adar = getElementData ( player, "maria" ) setElementData ( thePlayer, "maria", adar + 5 )
-
what you can do is multiply the number of the resolution by the size of the text font; local _, screeny = guiGetScreenSize() y = (screeny/768) --height resolution 1024x768, '768' is take size = y*1.50 dxDrawText("hello", flatX, floatY, floatX, flatY, tocolor(R, G, B, A), size, "pricedown", "left", "top", false, false, false, false, false) -- values are set by you, but the 'size' is the definition of multiplication
-
The logic would occasion is that the image is in a size that is not relevant
-
to be in within the image right?
-
Check it out setCameraMatrix Code; setCameraMatrix onClientPlayerJoin -- event