[Pedido] Comando de setar ADM
#2

pawn Код:
if(strcmp(cmd, "/daradmin", true) == 0)
    {
        if(Admin[playerid] >= 8 || IsPlayerAdmin(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp)) return SendClientMessage(playerid, -1, "Uso: /daradmin [ID] [LEVEL]");
            new id, lvl[256], level;
            id = ReturnUser(tmp);
            lvl = strtok(cmdtext, idx);
            level = strval(lvl);
            if(!strlen(lvl)) return SendClientMessage(playerid, -1, "Uso: /daradmin [ID] [LEVEL]");
            if(level > 10) return SendClientMessage(playerid, -1, "Level mбximo: 10.");
            if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "ID INVALIDO");
            Admin[id] = level;
            new string[256], n[24], n2[24];
            GetPlayerName(id, n, 24);
            GetPlayerName(playerid, n2, 24);
            format(string, 128, "Vocк deu admin level {00FF00}%d{FFFFFF} para o jogador {00FF00}%s{FFFFFF} .", level, n);
            SendClientMessage(playerid, -1, string);
            format(string, 128, "O administrador {FF4500}%s{FFFFFF} te deu admin nivel {FF4500}%d{FFFFFF} Parabйns.",n2, level);
            SendClientMessage(id, -1, string);
        }
        else { SendClientMessage(playerid, VERDE_AZUL, "Erro: {FFA500} Vocк nгo estб autorizado a usar este comando."); }
        return 1;
    }
erro? poste aqui talvez possa ajuda-lo
Reply


Messages In This Thread
[Pedido] Comando de setar ADM - by mateusmaia - 16.11.2011, 17:47
Re: Comando de setar ADM - by Mteck - 16.11.2011, 18:22
Re: Comando de setar ADM - by mateusmaia - 16.11.2011, 18:31
Re: Comando de setar ADM - by ViniBorn - 16.11.2011, 18:37
Re: Comando de setar ADM - by mateusmaia - 16.11.2011, 18:43
Re: Comando de setar ADM - by Mteck - 16.11.2011, 18:49
Re: Comando de setar ADM - by [KoS]Izaac - 16.11.2011, 18:56
Re: Comando de setar ADM - by mateusmaia - 16.11.2011, 19:03
Re: Comando de setar ADM - by [KoS]Izaac - 16.11.2011, 19:32
Re: Comando de setar ADM - by mateusmaia - 16.11.2011, 19:39

Forum Jump:


Users browsing this thread: 1 Guest(s)