SA-MP Forums Archive
[Ajuda] Adicionar /admins nгo online - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Adicionar /admins nгo online (/showthread.php?tid=632458)



Adicionar /admins nгo online - santans680 - 14.04.2017

alguem poderia me ajudar a adicionar admins nгo online em meu comando?

Esse й o comando.

PHP код:
    CMD:admins(playeridparams[])
    {
        foreach(
Playeri)
        {
            if(
PlayerInfo[i][pAdmin] > 0)
            {
                if(
admhide[i] == 0)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    new 
string[500];
                    if(
admtrampando[i] == 1)
                    {
                        if(
PlayerInfo[i][pAdmin] == 1337)
                            
format(string500"{B4B5B7}Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}Master{B4B5B7}] Funзгo:[{FF0000}%s{B4B5B7}]"sendername,PlayerInfo[i][pFuncao]);
                        else if(
PlayerInfo[i][pAdmin] == 3001)
                            
format(string500"{B4B5B7}Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}Subdono{B4B5B7}] Funзгo:[{FF0000}%s{B4B5B7}]"sendername,PlayerInfo[i][pFuncao]);
                        else if(
PlayerInfo[i][pAdmin] == 5000)
                            
format(string500"{B4B5B7}Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}Fundador{B4B5B7}] Funзгo:[{FF0000}%s{B4B5B7}]"sendername,PlayerInfo[i][pFuncao]);
                        else if(
PlayerInfo[i][pAdmin] == 1338)
                            
format(string500"{B4B5B7}Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}Gerente{B4B5B7}] Funзгo:[{FF0000}%s{B4B5B7}]"sendername,PlayerInfo[i][pFuncao]);
                        else
                            
format(string500"{B4B5B7}Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}%d{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]"sendernamePlayerInfo[i][pAdmin],PlayerInfo[i][pFuncao]);
                        
ShowPlayerDialog(playerid500DIALOG_STYLE_LIST"Administradores Online"string"Fechar""");
                    }
                    else
                    {
                        if(
PlayerInfo[i][pAdmin] == 1337)
                            
format(string500"{B4B5B7}Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}Master{B4B5B7}] Funзгo:[{FF0000}%s{B4B5B7}] {FF0000}[Jogando]"sendername,PlayerInfo[i][pFuncao]);
                        else if(
PlayerInfo[i][pAdmin] == 3001)
                            
format(string500"{B4B5B7}Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}Subdono{B4B5B7}] Funзгo:[{FF0000}%s{B4B5B7}] {FF0000}[Jogando]"sendername,PlayerInfo[i][pFuncao]);
                        else if(
PlayerInfo[i][pAdmin] == 5000)
                            
format(string500"{B4B5B7}Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}Fundador{B4B5B7}] Funзгo:[{FF0000}%s{B4B5B7}] {FF0000}[Jogando]"sendername,PlayerInfo[i][pFuncao]);
                        else if(
PlayerInfo[i][pAdmin] == 1338)
                            
format(string500"{B4B5B7}Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}Gerente{B4B5B7}] Funзгo:[{FF0000}%s{B4B5B7}] {FF0000}[Jogando]"sendername,PlayerInfo[i][pFuncao]);
                        else
                            
format(string500"{B4B5B7}Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}%d{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]"sendernamePlayerInfo[i][pAdmin],PlayerInfo[i][pFuncao]);
                        
ShowPlayerDialog(playerid500DIALOG_STYLE_LIST"Administradores Online"string"Fechar""");
                          }
                    }
                }
            }
            if(
PlayerInfo[i][pAdminTemp] > 0)
            {
                if(
admhide[i] == 0)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    new 
string[500];
                    if(
admtrampando[i] == 1)
                    {
                        
format(string500"{B4B5B7}Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}Temporбrio{B4B5B7}]"sendername);
                        
ShowPlayerDialog(playerid500DIALOG_STYLE_LIST"Administradores Online"string"Fechar""");
                    }
                    else
                    {
                        
format(string500"{B4B5B7}Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}Temporбrio{B4B5B7}] {FF0000}[Jogando]"sendername);
                        
ShowPlayerDialog(playerid500DIALOG_STYLE_LIST"Administradores Online"string"Fechar""");
                    }
                }
            }
        }
        return 
true;
    } 



Re: Adicionar /admins nгo online - HoodScript - 14.04.2017

Nгo й pra criar um tуpico novo a cada vez que nгo for ajudado! edite o tуpico antigo e utilize @up em um novo post slб


Re: Adicionar /admins nгo online - IlanZ - 14.04.2017

Mano, aqui nгo й igual certos forum que й so chegar, mandar fazer, que vгo fazer, nгo cara. Vai estudar e faz tu mesmo


Re: Adicionar /admins nгo online - ipsLuan - 14.04.2017

Ao invйs de criticar/rebaixar seria melhor dar uma luz com uma resposta que auxilie o cara.

@ON-TOPIC
Amigo, estude mais sobre a funзгo nativa do samp (file_functions) e depois vocк cria um comando que ler o que tб escrito nela. Lembre-se sempre do io_read e io_write.