Cmds freeze / unfreeze dont work anymore ??
#8

Try:
pawn Код:
COMMAND:freeze(playerid, params[])
{
    new name[MAX_PLAYER_NAME], ID, frozen[50];
   
    if(IsPlayerAdmin(playerid))
    {
        if(sscanf(params, "u", ID)) SendClientMessage(playerid, 0xE60000FF, "USAGE: /spec [ID]");
            else if(ID == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xE60000FF, "Player is not connected!");
                else
                {
                    GetPlayerName(ID, name, sizeof(name));
                    format(frozen, sizeof(frozen), "[SERVER]: %s has been frozen.", name);
                    TogglePlayerControllable(ID, 0);
                    SendClientMessageToAll(RED, frozen);
                }
    }
    else return 0;
    return 1;
}
Using: ZCMD and sscanf
EDIT: Just tested and it works, if you have problems it may be because of something else in your code.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)