11.11.2010, 13:01
pawn Код:
dcmd_killplayer(playerid,params[])
{
new target, TargetName[MAX_PLAYER_NAME];
new id;
new string[128];
if(!sscanf(params, "u", id))
{
if (id == INVALID_PLAYER_ID)
return SendClientMessage(playerid, RED, "That player its not connected.");
GetPlayerName(target, TargetName, sizeof(TargetName));
format(string,sizeof(string),"You have killed player %s",TargetName);
SendClientMessage(playerid,GREEN,string);
SetPlayerHealth(target, 0.0);
SendClientMessage(id, GREEN, "You has been killed by server admin.");}}
else SendClientMessage(playerid, RED, "USAGE: /killplayer <playerid>");
return 1;
}