aintaro Posted April 19, 2014 Share Posted April 19, 2014 hello guys, I was wondering how can you make a ped unkillable? thanks in advance, Aintaro Link to comment
Castillo Posted April 19, 2014 Share 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 Link to comment
Mr_Moose Posted April 19, 2014 Share Posted April 19, 2014 I think you need onClientPlayerStealthKill event too since stealth kills might not trigger onClientPlayerDamage. Not sure about it thought. Link to comment
Castillo Posted April 19, 2014 Share Posted April 19, 2014 That event only works for players, not peds. Link to comment
aintaro Posted April 19, 2014 Author Share Posted April 19, 2014 Thanks for the free code Castillo Link to comment
Mr_Moose Posted April 19, 2014 Share 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. Link to comment
Castillo Posted April 19, 2014 Share 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. Link to comment
Mr_Moose Posted April 19, 2014 Share 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. Link to comment
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