Jump to content

Need Help!


[DemoN]

Recommended Posts

Posted

1) I want to learn if we can disable heli-killing.

2) How can I attach a name and a health bar to peds like normal players? (is there any command called createHealthBar :P )

Posted

He means to prevent peds from being injured or killed by helicopter rotor blades ('heli-killing').

Yes, it is possible to disable it, as you probably already know from your time on DKR. I wouldn't know where to start though, maybe AcitanoX can help now that he knows what heli-killing is :P

Posted

I am not sure because the description of the "attacker" argument is vague, but try it nevertheless:

use this event: https://wiki.multitheftauto.com/wiki/OnClientPedDamage

check if attacker is a vehicle and if attacker's vehicle model number is heli model (https://wiki.multitheftauto.com/wiki/Vehicle_IDs)

If conditions are matched, cancelEvent()

Again, I'm not sure if the event will trigger when a heli damages a player because the description is pretty vague but i think it's worth a try , maybe someone else has another idea tho

Posted
maybe AcitanoX can help now that he knows what heli-killing is :P

Idk what function to use... maybe u can use the onPlayerDamage and check if the attacker is vehicle and if vehicle model is an helicopeter and then cancelEvent(), but if u use the hunter whit missiles u doesn't damage, idk try :S

Posted
if u use the hunter whit missiles u doesn't damage, idk try :S

you can disable hunter missiles with onPlayerVehicleEnter and setPedControlState...

Posted

Do you want to disable being damaged with a heli no matter how he got hit?

here it is:

--CLIENT SIDE!! 
addEventHandler('onClientPlayerDamage', root, 
function(attacker) 
if getElementType(attacker) == 'vehicle' and getElementModel(attacker) == 497 then -- You can add many ids as you want 
cancelEvent() 
end 
end 
) 

not tested and idk if it will work

the event:

https://wiki.multitheftauto.com/wiki/OnC ... ayerDamage

Posted
Do you want to disable being damaged with a heli no matter how he got hit?

here it is:

--CLIENT SIDE!! 
addEventHandler('onClientPlayerDamage', root, 
function(attacker) 
if getElementType(attacker) == 'vehicle' and getElementModel(attacker) == 497 then -- You can add many ids as you want 
cancelEvent() 
end 
end 
) 

not tested and idk if it will work

the event:

https://wiki.multitheftauto.com/wiki/OnC ... ayerDamage

Thank you. I'll try it

Posted
No problem, good luck.

Stealing AcitanoX's ideas! xD

Ty for made this script for he! :D

lol, i didn't steal it from you, i didn't even see your post. -_-

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