18.11.2016, 17:35
Look at this
pawn Код:
new serverKills;
new pKills[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID) { //making sure we have a valid killer. ie: player killed a player
pKills[killerid] += 1; //adding 1 more kill to the killer
if(serverKills == 0) { //if there were no kills yet
GivePlayerXP(killerid,25); //giving XP to the killer
new string[128];
format(string,sizeof(string),"%s first blood!",GetName(killerid));
SendClientMessageToAll(COLOR_GREEN,string);
}
serverKills += 1; //we are adding 1 more server kill to total kills
}
return 1;
}