21.06.2011, 17:12
pawn Код:
CMD:freeze(playerid, params[])
{
if(PlayerInfo[playerid][Admin] < 1) return SendClientMessage(playerid, 0x0259EAAA, "You are not admin");
{
new id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0x0259EAAA, "USAGE: /freeze [PlayerId/PartOfName]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0x0259EAAA, "Player is not connected");
new string[64], name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "Admin Action: Admin %s(%d) Has Frozen You", name, playerid);
SendClientMessage(id, 0xFF0000FF, string);
format(string, sizeof(string), "You Have Frozen %s(%d)", PlayerName, id);
SendClientMessage(playerid, 0xFF0000FF, string);
TogglePlayerControllable(id, false);
}
return 1;
}