Jump to content

Vehicle damae proof


overlocus

Recommended Posts

Server

for k, v in ipairs(getElementsByType("vehicle")) do
    setVehicleDamageProof(v, true)
end

addEventHandler("onVehicleExit", getRootElement(), function()
    setVehicleDamageProof(source, true)
end)

addEventHandler("onVehicleEnter", getRootElement(), function()
    setVehicleDamageProof(source, false)
end)

 

Link to comment

Thanks everybody but i have one more problem. The code failed when vehicle reversing so and the game started to fade.

how can i solve this problem?

 

How can I make sure no one can move while the vehicles are idle?

 

Also, the car does not explode during the explosion and is standing still

Edited by overlocus
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...