08.07.2010, 14:18
Got it (I think)
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid,playerid,reason);
Killed[playerid] = killerid;
pInfo[playerid][pDeaths]++;
if(killerid == INVALID_PLAYER_ID)
{
PlayerKills[playerid] = 0;
}
else
{
PlayerKills[killerid]++;
PlayerKills[playerid] = 0;
pInfo[killerid][pKills]++;
if(gTeam[killerid] != gTeam[playerid])
{
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
GivePlayerMoney(killerid, 3000);
new kName[128], string[128];
GetPlayerName(killerid, kName, sizeof(kName));
if (PlayerKills[killerid] == 10)
{
format(string, sizeof(string), "%s is on a Killing Spree! [10 kills]", kName);
SendClientMessageToAll(COLOR_UFAC, string);
return 1;
}
if (PlayerKills[killerid] == 20)
{
format(string, sizeof(string), "%s is on a Killing Spree! [20 kills]", kName);
SendClientMessageToAll(COLOR_UFAC, string);
return 1;
}
if (PlayerKills[killerid] == 30)
{
SendClientMessage(killerid,COLOR_GREEN,"You have access to /nuke!");
SendClientMessage(killerid,COLOR_RED,"WARNING: Activating nuke will destroy the whole city!");
format(string, sizeof(string), "%s is on a Killing Spree! [30 kills]", kName);
SendClientMessageToAll(COLOR_UFAC, string);
return 1;
}
if (PlayerKills[killerid] == 40)
{
format(string, sizeof(string), "%s is on a Killing Spree! [40 kills]", kName);
SendClientMessageToAll(COLOR_UFAC, string);
return 1;
}
}
}
NC[playerid] = 0;
return 1;
}