17.11.2011, 08:18
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID) {
SendDeathMessage(killerid,playerid,reason);
if(gTeam[killerid] != gTeam[playerid]) {
GivePlayerMoney(killerid, 300);
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
}
else {
SendDeathMessage(INVALID_PLAYER_ID,playerid,reason );
GivePlayerMoney(killerid, -300);
SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
}
}
return 1;
}