SA-MP Forums Archive
Minigun protection - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Minigun protection (/showthread.php?tid=628446)



Minigun protection - PeanutButter - 10.02.2017

Is there a way to prevent team killing with a minigun?
I tried to do it with OnPlayerTakeDamage, it works for all weapons expect the minigun.

This is what I use to prevent team killing
PHP код:
SetPlayerHealth(playeridHP+amount); 
Is there a better method, because this one is too slow to handle a minigun.


Re: Minigun protection - Vince - 10.02.2017

SetPlayerTeam. Disables all damage, no code required.


Re: Minigun protection - PeanutButter - 10.02.2017

Quote:
Originally Posted by Vince
Посмотреть сообщение
SetPlayerTeam. Disables all damage, no code required.
Thanks landgenoot, it works!