06.01.2011, 09:55
pawn Код:
COMMAND:killplayer(playerid, params[])
{
if(IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You're not an admin!");
else
{
new ID;
if(sscanf(params, "u", ID)) SendClientMessage(playerid, COLOR_RED, "USAGE: /killplayer <ID>");
else if(IsPlayerConnected(ID) == 0) SendClientMessage(playerid, COLOR_RED, "Player is not connected");
else
{
SendClientMessage(ID, COLOR_RED, "You have been killed by an Admin!");
SetPlayerHealth(ID, 0);
SendClientMessage(playerid, COLOR_RED, "Player killed!");
}
}
return 1;
}