Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. The race game mode uses a text library, in order to enable HEX color codes, you must edit that library.
  2. Castillo

    ACL

    Entonces usa: if ( accName == "eldelahoz" ) then -- Haces algo aqui. end
  3. Castillo

    ACL

    Entonces usa la cuenta?
  4. Castillo

    ACL

    Usa: isObjectInACLGroup
  5. Castillo

    Problem SQL

    Can you post or send me on PM the whole script?
  6. Castillo

    Problem SQL

    Same problem ( Expected db-connection )?
  7. fuelTimers = { } function aFuel ( ) if ( not getElementData ( source, "fuel" ) ) then setElementData ( source, "fuel", 25 ) end end function dropFuel ( player, seat, jacked ) if getElementData ( source, "fuel" ) then if getVehicleController ( source ) then if ( getVehicleEngineState ( source ) == true ) then fuelTimers [ source ] = setTimer ( function ( vehiclex ) if getVehicleController ( vehiclex ) then if ( getVehicleEngineState ( vehiclex ) == true ) then if ( getElementData ( vehiclex, "fuel" ) ~= 0 ) then setElementData ( vehiclex, "fuel", getElementData ( vehiclex, "fuel" ) - 1 ) end end end end ,1000, 0, source ) end end end end function killFuelTimer ( _, seat ) if ( seat == 0 ) then if isTimer ( fuelTimers [ source ] ) then killTimer ( fuelTimers [ source ] ) end end end addEventHandler ( "onVehicleExit", getRootElement(), killFuelTimer ) function testFuel ( playerSource ) if isPedInVehicle ( playerSource ) then local vehicle = getPedOccupiedVehicle ( playerSource ) if ( getVehicleController ( vehicle ) == playerSource ) then if getElementData ( vehicle, "fuel" ) then if ( getElementData ( vehicle, "fuel" ) == 0 ) then setVehicleEngineState ( vehicle, false ) outputChatBox ( "Nie masz paliwa w samochodzie", playerSource ) else outputChatBox ( "Masz paliwo w samochodzie", playerSource ) end else outputChatBox ( "Ten pojazd nie ma paliwa w sobie", playerSource ) end end end end addCommandHandler ( "tf", testFuel ) addEventHandler ( "onVehicleStartEnter", getRootElement(), aFuel ) addEventHandler ( "onVehicleEnter", getRootElement(), dropFuel )
  8. Castillo

    Shout Admin

    Y cual es el problema?
  9. sx,sy,sz = guiGetScreenSize You forgot the parentheses, and 'sz' is not doing anything there, guiGetScreenSize returns two arguments only. sx, sy = guiGetScreenSize ( )
  10. You said that you tried removing it by script, are you sure that you put it all right?
  11. That's because you're adding the event handler before the marker is created, move: addEventHandler ( "onMarkerHit", theMarker, gui ) to "marker" function, after createMarker.
  12. Some objects can't be removed with map editor.
  13. Simply hide it after creating it. addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.staticimage = guiCreateStaticImage(95, 45, 827, 660, "images/design.png", false) guiSetVisible ( GUIEditor.staticimage, false ) end )
  14. I don't understand what is the problem.
  15. onClientPlayerJoin is triggered only when a remote player joins.
  16. Castillo

    Problem SQL

    Is 'connection' defined in the same script?
  17. That code you sent me is wrong.
  18. To check for level use getElementData.
  19. That's wrong, that'll keep adding the event every time. Do this: Create a table to store the timers, then store the timers using the vehicle element as index, then create a function like 'dropFuel' but to kill the timer if exist.
  20. You aren't killing the timer on exit.
  21. Castillo

    Jobs

    Element data is a temporary way of storing data, once the element is destroyed ( e.g: the player quits ), the data is gone.
×
×
  • Create New...