Jump to content

Event "onVehiclePreExplode"


Recommended Posts

Posted

You can use onVehicleDamage > setElementHealth.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • 4 weeks later...
Posted

You can use this:

local myCars = {} 
  
addEventHandler("onVehicleDamage", root, 
function() 
    if getElementHealth(source) < 300 and not myCars[source] then 
        myCars[source] = true 
        setElementHealth(source, 300) 
        setVehicleDamageProof(source, false) 
    end 
end) 

If the car's health has less than 300 then set the vehicle damage proof to false.

State: Inactive

  • Recently Browsing   0 members

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