PDA

View Full Version : How to prevent hunter from killing other hunters with bazooka?



ORDI
24th April 2015, 14:49
hello everybody

when the hunter want to kill the zombie(s) with the bazooka, the bazooka can kill the hunter too.
i would like to know if it is possible to protect the hunter who use the bazooka ?

guiismiti
24th April 2015, 15:42
yes, it is!

ORDI
24th April 2015, 16:32
can you tell me how?

Mitch
24th April 2015, 16:37
yes, it is!

I have added in my mod an if with a return when the hunter is moving to a other team. (And i also check if he killed or damaged a other player.)

Edit: see the damage/killed callback.

Edit 2: Can you make proper thread title next time? Instead of just 'bazooka' use a title like 'How to prevent hunter from killing other hunters with bazooka?'.
Edit 3: @ORDI I assume you have friendly fire off, right?

ORDI
24th April 2015, 18:00
yep it is off

i mean when the hunter kill the zombies with the bazooka, it can kill himself also

ORDI
24th April 2015, 19:26
ok, topic solved, thx for help

kung foo man
26th April 2015, 06:27
Constant reminder: post solution, if found by yourself

ORDI
26th April 2015, 10:01
Callback_PlayerDamage(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime)
{
if(self.sessionteam == "spectator")
return;

if (isdefined(eAttacker) && isdefined(self) && eAttacker == self && sWeapon == "rpg_mp")// the bazooka
return;

Tally
26th April 2015, 10:34
Callback_PlayerDamage(eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime)
{
if(self.sessionteam == "spectator")
return;

if (isdefined(eAttacker) && isdefined(self) && eAttacker == self && sWeapon == "rpg_mp")// the bazooka
return;

But that stops damage to everyone - hunters and zombies alike - as there is no check for which team they are on. Is that what you wanted?

ORDI
27th April 2015, 08:41
anyway only the hunters can have this bazooka. and yes is that what i wanted ;)