06.07.2010, 10:46
I think this will work
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerKills[killerid]++;
if (PlayerKills[killerid] == 30)
{
SendClientMessage(killerid,COLOR_RED,"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;
}
return 1;
}
pawn Код:
dcmd_nuke(playerid,params[])
{
#pragma unused params
if(PlayerKills[playerid] >= 30) // if kills is 30 or more
{
SetTimer("Nuke",10000,0);
SendClientMessageToAll(COLOR_RED,"Nuclear Bomb has been activated!");
SendClientMessageToAll(COLOR_RED,"The bomb goes off in 10 seconds!");
NC[playerid] = 0;
}
return 1;
}