[AJUDA]Colocar nomes nas Enum
#1

Aк galera й o seguinte tenho um comando de aparecer os cara que estгo Online do BOPE

Код:
                        if(!strcmp(cmdtext, "/bopes", true))
        {
            SendClientMessage(playerid, COLOR_RED, "|_____ POLICIAIS DO BOPE ______|");
                new count=0;
                for(new i=0; i<MAX_PLAYERS; i++)
                {
                if(IsPlayerConnected(i))
                {
                    if(logged[i] == 1)
                    {
                                        if(PlayerInfo[i][pBOPE] >= 1)
                                        {
                                                new str[256];
                                                new pname[24];
                                                GetPlayerName(i, pname, 24);
                                                format(str, 256, "Membro: %s | [Level %d] ", pname, PlayerInfo[i][pBOPE]);
                                                SendClientMessage(playerid, COLOR_CYAN, str);
                                                count++;
                                        }
                                }
                        }
                }
                if(count == 0)
                {
                SendClientMessage(playerid, COLOR_CYAN, "Nгo tem nenhum BOPE on-line agora!");
                }
                return 1;
        }
Tipo queria botar para esse "if(PlayerInfo[i][pBOPE] >= 1)" para quando eu botar para aparecer tipo envez de aparecer o nome aparecer o cargo ex "if(PlayerInfo[i][pBOPE] >= 1)" Level 1 aparecer assim Soldado ai quando o cara botar o comando envez de aparecer level 1 aparecer Soldado do BOPE. Semelhante a algo assim

Код:
 

{ 
    if(PlayerInfo[playerid][pBOPE] == 1) { format(string, sizeof(string), "Soldado %s", sendername); } 
    else if(PlayerInfo[playerid][pBOPE] == 2) { format(string, sizeof(string), "Sargento: %s", sendername); } 
    else if(PlayerInfo[playerid][pBOPE] == 3) { format(string, sizeof(string), "Major %s", sendername); } 
    else if(PlayerInfo[playerid][pBOPE] == 4) { format(string, sizeof(string), "Capitгo %s", sendername); } 
    else if(PlayerInfo[playerid][pBOPE] == 5) { format(string, sizeof(string), "Ten.Coronel %s", sendername); } 
    else if(PlayerInfo[playerid][pBOPE] == 6) { format(string, sizeof(string), "Comandante %s", sendername); } 
}
Por ex: ai quando eu usa-se o comando aparecerзe

|_____ POLICIAIS DO BOPE ______|
Soldado [RTX]Ween_@[GM] <- pra quem for lv 1
Comandante [RTX]Ween_@[GM] <- pra quem for lv 6


й + ou - que nem esse post ai galera espero que posгo me ajudar, grato desde ja
Reply


Messages In This Thread
[AJUDA]Colocar nomes nas Enum - by Nake01 - 16.05.2011, 01:56
Re: [AJUDA]Colocar nomes nas Enum - by Pharrel - 16.05.2011, 02:08
Re: [AJUDA]Colocar nomes nas Enum - by [S]trong - 16.05.2011, 10:12
Re: [AJUDA]Colocar nomes nas Enum - by Pharrel - 16.05.2011, 13:35
Re: [AJUDA]Colocar nomes nas Enum - by Nake01 - 16.05.2011, 16:16
Re: [AJUDA]Colocar nomes nas Enum - by Dr_Pawno - 16.05.2011, 16:18
Re: [AJUDA]Colocar nomes nas Enum - by [S]trong - 16.05.2011, 17:01
Re: [AJUDA]Colocar nomes nas Enum - by Nake01 - 16.05.2011, 17:27

Forum Jump:


Users browsing this thread: 1 Guest(s)