04.02.2011, 07:16
Or that :P
Command:
Somewhere in ur script:
Command:
pawn Код:
command(freeze, playerid, params[])
{
new id, string[128];
if(Player[playerid][AdminLevel] >= 1) return SendClientMessage(playerid, RED, "You are not allowed to use this command");
if(sscanf(params, "d", id)) return SendClientMessage(playerid, WHITE, "USAGE: /freeze [playerid]");
TogglePlayerControllable(id, 0);
format(string, sizeof(string), "AdmCmd: %s has been frozen by %s", pName(id), pName(playerid));
SendClientMessageToAll(ADMINORANGE, string);
return 1;
}
pawn Код:
stock pName(playerid)
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
return Name;
}