[Ajuda] Comando de /admins
#1

Oi galera, venho de novo pedir ajuda de voces ... й o seguinte, eu tenho o comando /admins que serve para os players verem os admins que estгo em serviзo (duty) mais quando o player faz o comando aparece assim:

Administrador: [nome do admin] - Nivel [5]
Administrador: [nome do admin] - Nivel [10]
Administrador: [nome do admin] - Nivel [20]

e eu queria que aparece da seguinte forma:

se o admin fosse nivel 5 aparece-se assim:

Game-Master: [nome do game master] - Nivel[5]



se o admin fosse nivel 10 aparece-se assim:

Administrador: [nome do admin] - Nivel [10]



se o admin fosse nivel 20 aparece-se assim:

Owner: [nome do admin] - Nivel [20]

aqui estб o comando:
pawn Код:
if (strcmp(cmd, "/admins", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new count = 0;
            SendClientMessage(playerid, COLOR_GREEN, "____________________[ Administradores em serviзo ]____________________");
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[i][pAdmin] >= 1 && AdminDuty[i] == 1)
                    {
                        format(string, 256, "Administrador: %s - [Nivel na Staff: %d]", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        SendClientMessage(playerid, COLOR_WHITE, string);
                        count++;
                    }
                }
            }
            if(count == 0)
            {
                SendClientMessage(playerid,COLOR_WHITE,"[INFO:] Nгo hб administrador em serviзo.");
            }
            SendClientMessage(playerid, COLOR_GREEN, "___________________________________________________________________");
        }
        return 1;
    }


Alguem me consegue ajudar ?


Ficaria muito agradecido...
Reply
#2

pawn Код:
if (strcmp(cmd, "/admins", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new bool:AdminsOnline = false;
            SendClientMessage(playerid, COLOR_GREEN, "____________________[ Administradores em serviзo ]____________________");
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[i][pAdmin] >= 1 && AdminDuty[i] == 1)
                    {
                        if(PlayerInfo[i][pAdmin] == 1) format(string, 256, "Nome do Admin Nivel 1: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 2) format(string, 256, "Nome do Admin Nivel 2: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 3) format(string, 256, "Nome do Admin Nivel 3: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 4) format(string, 256, "Nome do Admin Nivel 4: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 5) format(string, 256, "Nome do Admin Nivel 5: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        SendClientMessage(playerid, COLOR_WHITE, string);
                        AdminsOnline = true;
                    }
                }
            }
            if(!AdminsOnline)
            {
                SendClientMessage(playerid,COLOR_WHITE,"[INFO:] Nгo hб administrador em serviзo.");
            }
            SendClientMessage(playerid, COLOR_GREEN, "___________________________________________________________________");
        }
        return 1;
    }
Agora й so trocar os Nome do Administrador Nivel Tal =D
Reply
#3

Nгo funcionou ;(
Reply
#4

pawn Код:
if (strcmp(cmd, "/admins", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new bool:AdminsOnline = false;
            SendClientMessage(playerid, COLOR_GREEN, "____________________[ Administradores em serviзo ]____________________");
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[i][pAdmin] >= 1 && AdminDuty[i] == 1)
                    {
                        if(PlayerInfo[i][pAdmin] == 1) format(string, 256, "Nome do Admin Nivel 1: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 2) format(string, 256, "Nome do Admin Nivel 2: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 3) format(string, 256, "Nome do Admin Nivel 3: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 4) format(string, 256, "Nome do Admin Nivel 4: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 5) format(string, 256, "Nome do Admin Nivel 5: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 6) format(string, 256, "Nome do Admin Nivel 6: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 7) format(string, 256, "Nome do Admin Nivel 7: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 8) format(string, 256, "Nome do Admin Nivel 8: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 9) format(string, 256, "Nome do Admin Nivel 9: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 10) format(string, 256, "Nome do Admin Nivel 10: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 15) format(string, 256, "Nome do Admin Nivel 15: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        else if(PlayerInfo[i][pAdmin] == 20) format(string, 256, "Nome do Admin Nivel 20: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
                        SendClientMessage(playerid, COLOR_WHITE, string);
                        AdminsOnline = true;
                    }
                }
            }
            if(!AdminsOnline)
            {
                SendClientMessage(playerid,COLOR_WHITE,"[INFO:] Nгo hб administrador em serviзo.");
            }
            SendClientMessage(playerid, COLOR_GREEN, "___________________________________________________________________");
        }
        return 1;
    }
--' Edita primeiro
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)