SA-MP Forums Archive
[Ajuda] Adicionar dialog em /admins - 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 dialog em /admins (/showthread.php?tid=632449)



Adicionar dialog em /admins - santans680 - 14.04.2017

Alguйm poderia por favor ajudar-me a adicionar dialog no meu comando /admins irei lhes mostrar o comando.

PHP код:
    CMD:admins(playeridparams[])
    {
        
SendClientMessage(playeridCOR_ADMIN"Admins Online:");
        foreach(
Playeri)
        {
            if(
PlayerInfo[i][pAdmin] > 0)
            {
                if(
admhide[i] == 0)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    new 
string[200];
                    if(
admtrampando[i] == 1)
                    {
                        if(
PlayerInfo[i][pAdmin] == 1337)
                            
format(string128"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(string128"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(string128"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(string128"Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}Gerente{B4B5B7}] Funзгo:[{FF0000}%s{B4B5B7}]"sendername,PlayerInfo[i][pFuncao]);
                        else
                            
format(string128"Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}%d{B4B5B7}] Funзгo:[{FF0000}%s{B4B5B7}]"sendernamePlayerInfo[i][pAdmin],PlayerInfo[i][pFuncao]);
                            
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                    else
                    {
                        if(
PlayerInfo[i][pAdmin] == 1337)
                            
format(string128"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(string128"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(string128"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(string128"Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}Gerente{B4B5B7}] Funзгo:[{FF0000}%s{B4B5B7}] {FF0000}[Jogando]"sendername,PlayerInfo[i][pFuncao]);
                        else
                            
format(string128"Admin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}%d{B4B5B7}] Funзгo:[{FF0000}%s{B4B5B7}] {FF0000}[Jogando]"sendernamePlayerInfo[i][pAdmin],PlayerInfo[i][pFuncao]);
                            
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                    
                }
            }
            if(
PlayerInfo[i][pAdminTemp] > 0)
            {
                if(
admhide[i] == 0)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    new 
string[128];
                    if(
admtrampando[i] == 1)
                    {
                        
format(string128"Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Temporбrio{B4B5B7}]"sendername);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                    else
                    {
                        
format(string128"Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Temporбrio{B4B5B7}] {FFFFFF}[Jogando]"sendername);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                }
            }
        }
       return 
true;
    } 
Se alguйm puder me ajudar por favor eu agradeзo muito!! Desde Jб agradeзo


Re: Adicionar dialog em /admins - teteu99 - 14.04.2017

Organiza esse POST seu, da ate preguiзa sу de olhar!


Re: Adicionar dialog em /admins - santans680 - 14.04.2017

pronto jб ajustei poderia me ajudar pf?


Re: Adicionar dialog em /admins - MorteAmerica - 14.04.2017

Vocк vai ter q aumentar a capacidade da variavel, no inicio de cada format getar as infomaзхes que ja estгo nela.
Exemplo:

Код:
format(string, 128, "%s\nAdmin: {FF0000}%s {B4B5B7}Nнvel:[{FF0000}Master{B4B5B7}] Funзгo:[{FF0000}%s{B4B5B7}]", string, sendername,PlayerInfo[i][pFuncao]);
depois sу chamar a dialog usando a string:
OBS: somente depois de ter formatado todos os cargos.

Код:
ShowPlayerDialog(playerid, ID_DIALOG, STYLE, "Administradores Online", string, "Fechar", "");



Re: Adicionar dialog em /admins - santans680 - 14.04.2017

entгo no lugar de 128 eu devo adicionar um numero maior certo?


Re: Adicionar dialog em /admins - MorteAmerica - 14.04.2017

exato. Na variavel e na format


Re: Adicionar dialog em /admins - santans680 - 14.04.2017

funciono valeu muito obrigado!!