I want to add a system where when a player kill another player the player who is the killer will gain some money and score how to do this any ideas?
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
SetPlayerScore (killerid, GetPlayerScore (killerid) + 1); // change the number (1 ) to any score you want
SendClientMessage(killerid,COLOR_LIGHTBLUE,"You Got 5$ and 1 Score For This Kill ");
Player[killerid][pKills]++;
GivePlayerMoneyEx( killerid,5);// change the number ( 5 ) to any money amount you want
}
return 1;
}