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))
{
if(IsPlayerConnected(id))
{
new string[64];
new 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 Has Feeze You", name);
SendClientMessage(id, 0xFF0000FF, string);
format(string, sizeof(string), "You Has Freeze %s", PlayerName);
SendClientMessage(playerid, 0xFF0000FF, string);
TogglePlayerControllable(id, 0);
return 1;
}
else return SendClientMessage(playerid, 0x0259EAAA, "Player is not connected");
}
else return SendClientMessage(playerid, 0x0259EAAA, "USAGE: /freeze [PlayerId/PartOfName]");
}
return 1;
}
You forgot the last return. Don't forget that one, otherwise it won't work