SA-MP Forums Archive
How do I make the killer get cash after they killed someone? - 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: How do I make the killer get cash after they killed someone? (/showthread.php?tid=468141)



How do I make the killer get cash after they killed someone? - IPlayGames000 - 06.10.2013

The title says it all, how do I make it to where the killer gets cash when they kill someone?


Re: How do I make the killer get cash after they killed someone? - ic3cr3am - 06.10.2013

Quote:

public OnPlayerDeath(playerid, killerid, reason)
{
GivePlayerMoney(killerid, 1000);
return 1;
}

1234


Re: How do I make the killer get cash after they killed someone? - ejb - 06.10.2013

Don't forget to check if the killer is valid.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
     if (killerid != INVALID_PLAYER_ID)
     {
        GivePlayerMoney(killerid, 1000);
     }
     return 1;
}