aintaro Posted April 19, 2014 Posted April 19, 2014 hello guys, I was wondering how can you make a ped unkillable? thanks in advance, Aintaro None of us is as smart as all of us.
Castillo Posted April 19, 2014 Posted April 19, 2014 You must cancel the onClientPedDamage event. You can also use my "extra_health" resource which has an invulnerable function. https://community.multitheftauto.com/in ... ls&id=5195 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Mr_Moose Posted April 19, 2014 Posted April 19, 2014 I think you need onClientPlayerStealthKill event too since stealth kills might not trigger onClientPlayerDamage. Not sure about it thought. MTA Community | GitHub | 99Stack Forum
Castillo Posted April 19, 2014 Posted April 19, 2014 That event only works for players, not peds. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
aintaro Posted April 19, 2014 Author Posted April 19, 2014 Thanks for the free code Castillo None of us is as smart as all of us.
Mr_Moose Posted April 19, 2014 Posted April 19, 2014 It says ped in the wiki and I managed to cancel it for peds as well in v1.3.5. Unless if it's changed recently it should work for peds too. MTA Community | GitHub | 99Stack Forum
Castillo Posted April 19, 2014 Posted April 19, 2014 Oh, I don't know if they added that recently, last time I checked I wasn't able to cancel it. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Mr_Moose Posted April 19, 2014 Posted April 19, 2014 Could probably be like that, most functions and events which is originally made for single elements but applies the same properties to their source elements merging and creates new functions like setElementHealth() for instance, which used to be setPlayerHealth(), setVehicleHealth() (If I remember correct), etc.. Anyway I had this issue in my store robbery script not long ago which also was supposed to protect peds from getting killed. MTA Community | GitHub | 99Stack Forum
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now