SA-MP Forums Archive
Check OnPlayerDeath - 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: Check OnPlayerDeath (/showthread.php?tid=143916)



Check OnPlayerDeath - leapfish - 24.04.2010

Hello how can I add a check on OnPlayerDeath to see if killerid killed playerid with certain weapon...

For example to check if Killer killed player with sniper only?

Can anyone help please...


Re: Check OnPlayerDeath - Jakku - 24.04.2010

Under OnPlayerDeath
pawn Код:
if (GetPlayerWeapon(killerid) == 34) {
//Happens if killer has a sniper
}



Re: Check OnPlayerDeath - leapfish - 24.04.2010

No that's not what I was looking for...

Now what you said it will be....

Killer can use deagle to kill a player, but have sniper in his weapon slots and it will count as right...

Please help!!


Re: Check OnPlayerDeath - Correlli - 24.04.2010

GetPlayerWeapon - will return the ID of the weapon which is in player's hand.
GetPlayerWeaponData - you can use this function to get any weapon in player's weapon-slot.

I guess you were looking for this information, correct?


Re: Check OnPlayerDeath - leapfish - 24.04.2010

Ohh didn't know that...

Thanks Jakku and Don Correlli, sorry was my bad...

It will work...