[PEDIDO] Bloquear todos os comandos do servidor
#3

Inicio do Game Mode
pawn Код:
new bool: CMDBloqueado = false;
Inicio do OnPlayerCommandText
pawn Код:
if(CMDBloqueado == true && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Comandos bloqueados");
Qualquer lugar do OnPlayerCommandText
pawn Код:
if(strcmp("/bloquearcmds", cmdtext, true, 14) == 0)
    {
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Vocк nгo tб logado na RCon");
        if(CMDBloqueado == false)
        {
            CMDBloqueado = true;
            SendClientMessageToAll(0xFFFFFFFF, "Todos os comandos foram bloqueados");
        }
        else
        {
            CMDBloqueado = false;
            SendClientMessageToAll(0xFFFFFFFF, "Todos os comandos foram desbloqueados");
        }
        return 1;
    }
Shadow
Vocк esqueceu de colocar a funзгo que impede o player usar comando se tiver bloqueado =)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)