Jump to content

Help with Vehicle godmode.


niemi

Recommended Posts

Posted

I need help with vehicle godmode, I found an example from the forums that makes player godmode:

function damag(attacker, weapon, bodypart) 
  
    cancelEvent() 
end 
addEventHandler("onClientPlayerDamage", getLocalPlayer(), damag) 

But i can't make it work for vehicles, I tried this:

function damag(attacker, weapon) 
  
    cancelEvent() 
end 
addEventHandler("onVehicleDamage", getRootElement(), damag) 

It doesn't work. I'm just beginning lua scripting, but i can't get that work.

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