Jump to content

Vehicle damae proof


overlocus

Recommended Posts

Posted

i have rp server and vehicles respawning regularly so is this code also suitable for this?

also i cant work this code is this server side or client side ?

and can you give this code all in all

350x20_0AC2FF_FFFFFF_000000_000000.png

Posted

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)

 

Posted (edited)

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

350x20_0AC2FF_FFFFFF_000000_000000.png

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...