SA-MP Forums Archive
Correctly identify rocket kill - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Correctly identify rocket kill (/showthread.php?tid=100834)



Correctly identify rocket kill - Redirect Left - 06.10.2009

How can i correctly identify a rocket kill? I've tried reason 35 (Rocket Launcher) and 51 (Explosion) but they still don't recognise being kill by a rocket. This is using if(reason == 35 / 51) on OnPlayerDeath.


Re: Correctly identify rocket kill - iLinx - 06.10.2009

use GetPlayerWeapon and check for a rocketlauncher


Re: Correctly identify rocket kill - Redirect Left - 08.10.2009

Any other method I can do easily using reason == ?


Re: Correctly identify rocket kill - _Vortex - 08.10.2009

maybe...

under OnPlayerDeath
pawn Код:
if(reason == id) return bla bla
I'm not sure though


Re: Correctly identify rocket kill - pagie1111 - 08.10.2009

pawn Код:
if(GetPlayerWeapon(playerid) == 35)
{
SendDeathMessage(killerid,playerid,35);
return 1;
}
But for all weapons use this

pawn Код:
new weaponid;
weaponid = GetPlayerWeapon(playerid);
SendDeathMessage(killerid,playerid,weaponid);



Re: Correctly identify rocket kill - BMUK - 08.10.2009

Rocket kill? Isnt that just an explosion icon?

Which works fine for me


Re: Correctly identify rocket kill - ded - 08.10.2009

Quote:
Originally Posted by BMUK
Rocket kill? Isnt that just an explosion icon?

Which works fine for me
Meaning your server ends up banning people for using grenades, car explosions, etc. gf.