Jump to content

Enargy,

Members
  • Posts

    1,102
  • Joined

Everything posted by Enargy,

  1. Try removing 'thePlayer' from timerr[thePlayer]
  2. let me check your code where files are replaced.
  3. 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.
  4. 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 )
  5. dxDrawText("Admin OnDut", sx-2, sy-232, sx, sy, tocolor(0, 255, 0, 200), fontbig, "default-bold", "center")
  6. the code works perfectly. are you sure that the script is serverside? check meta file
  7. As fair I know, insert serial into a table and use getPlayerSerial and onPlayerCommand
  8. the function called sirens use triggerClientEvent instead of setVehicleSirensOn and add in the clientside playSound3D and stopSound
  9. getElementPosition getPedOccupiedVehicle attachElementToElement triggerClientEvent getLocalPlayer playSound3D bindKey
  10. 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 )
  11. Enargy,

    Abseil problem

    try using getLocalPlayer() instead of Ped
  12. 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 )
  13. getServerName() works in server-side, not client-side.
  14. Hopefully I'll upload them tomorrow, I am too much tired right now, so I'll go to sleep now. Are you drunk?
  15. change second code; line #14 and #15: local adar = getElementData ( player, "maria" ) setElementData ( thePlayer, "maria", adar + 5 )
  16. 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
  17. The logic would occasion is that the image is in a size that is not relevant
  18. to be in within the image right?
  19. Check it out setCameraMatrix Code; setCameraMatrix onClientPlayerJoin -- event
×
×
  • Create New...