Jump to content

ODutii

Members
  • Posts

    111
  • Joined

  • Last visited

Everything posted by ODutii

  1. Did not work what I do?
  2. When the player enters the vehicle and the damage is at 300, the vehicle will not start, what is wrong? function broken(player) if getElementHealth(player) >= 301 then setVehicleEngineState(player, true) elseif getRootElement(player) <=300 then setVehicleEngineState(player, false) end end addEventHandler("onVehicleEnter", root,broken)
  3. And for when he gets into the broken vehicle, the vehicle does not start?
  4. I am trying to create, when the vehicle damage reaches 30, the vehicle shuts down, what went wrong? function showLocalHealth() -- get the player's vehicle: if he is in one, output its health as well local playerVehicle = getPedOccupiedVehicle ( localPlayer ) if playerVehicle then local vehicleHealth = getElementHealth ( playerVehicle ) / 10-- Divide this by 10, as default the denominator is 1000 if vehicleHealth < 30 then setVehicleEngineState ( playerVehicle, false ) end end end
  5. - Player inside the vehicle, when leaving the server, the vehicle is destroyed, but it didn't happen, you can check what I did wrong function leaveserver(player) if veh1[player] and isElement(veh1[player]) then destroyElement(veh1[player]) end end addEventHandler("onPlayerQuit", getRootElement(), leaveserver)
  6. Thanks man, you helped a lot! Thanks !!!!
  7. the script to pick up the vehicle and teleport until it worked, but the problem is that when I get out of the vehicle the vehicle disappears instantly, I want it to disappear in 5 minutes, see what I'm doing wrong function leavevehicle(player) if veh1[player] and isElement(veh1[player]) then t = setTimer ( leavevehicle, 5000, 1, destroyElement(veh1[player])) -- I put 5 seconds to see the fastest results, but still it disappears instantly end end addEventHandler("onVehicleExit", getRootElement(), leavevehicle)function entervehicle(player) killTimer (t) end addEventHandler("onVehicleEnter", getRootElement(),entervehicle)
  8. No, I meant that when he enters the marker, he creates a vehicle, and the player teleports to the vehicle, but when he leaves the vehicle, if he doesn't return, the vehicle will disappear in 5 minutes, it's like a work to deliver pizza, if he leaves and doesn't come back(from the vehicle), the vehicle disappears.
  9. I have a little problem with my script. I did for when he goes to the marker, he creates a vehicle, and I'm trying to create for when the player leaves the vehicle, wait 5 minutes, with the player off the vehicle, the vehicle disappears, and it didn't. can help me?
×
×
  • Create New...