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)
+--- Thread: OnPlayerDeath (
/showthread.php?tid=375835)
OnPlayerDeath -
Qaiis - 08.09.2012
Is it posible that the killerid gets one score only if the killerweapon was an Knife?
Re: OnPlayerDeath - Glint - 08.09.2012
Try something like this :
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPlayerWeapon(killerid) == 4)
{
SetPlayerScore(killerid, GetPlayerScore(playerid) + 1);
}
return 1;
}
I didn't compile or test it.