Correctly identify rocket kill
#1

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.
Reply
#2

use GetPlayerWeapon and check for a rocketlauncher
Reply
#3

Any other method I can do easily using reason == ?
Reply
#4

maybe...

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

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);
Reply
#6

Rocket kill? Isnt that just an explosion icon?

Which works fine for me
Reply
#7

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


Forum Jump:


Users browsing this thread: 1 Guest(s)