SA-MP Forums Archive
[Pedido] Transformar Dialog em chat normal - 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: [Pedido] Transformar Dialog em chat normal (/showthread.php?tid=407698)



Transformar Dialog em chat normal - FPB_Lipos - 14.01.2013

Pessoal como eu posso transformar o comando /admins que esta em Dialog par Chat normal ?
Comando:
pawn Код:
if (strcmp(cmd, "/admins", true) == 0)
    {
        new DialogThiago[1500];
        //SendClientMessage(playerid, COLOR_WHITE, "|__________________[ Admins Online ]__________________|");
        for(new i = 0; i <= MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pAdmin] > 0)
            {
                if(admhide[i] == 0)
                {
                    GetPlayerName(i, sendername, sizeof(sendername));
                    new lolz[20];
                    if(PlayerInfo[i][pAdmin] == 1)
                    {
                        lolz = "Auxiliar";
                    }
                    if(PlayerInfo[i][pAdmin] == 2)
                    {
                        lolz = "Administrador";
                    }
                    if(PlayerInfo[i][pAdmin] == 3)
                    {
                        lolz = "Moderador";
                    }
                    if(PlayerInfo[i][pAdmin] == 4)
                    {
                        lolz = "Administrador";
                    }
                    if(PlayerInfo[i][pAdmin] == MASTER)
                    {
                        lolz = "Master";
                    }
                    if(PlayerInfo[i][pAdmin] == SUB_GERENTE)
                    {
                        lolz = "Administrador";
                    }
                    if(PlayerInfo[i][pAdmin] == GERENTE)
                    {
                        lolz = "Gerente";
                    }
                    if(PlayerInfo[i][pAdmin] == SUB_DONO)
                    {
                        lolz = "Administrador";
                    }
                    if(PlayerInfo[i][pAdmin] == DONO)
                    {
                        lolz = "Administrador";
                    }
                    if(away[i] == 0)
                    {
                        if(admtrampando[i] == 1)
                        {
                            format(string, 128, "{98F5FF}%s {FFFFFF}[%s] {98F5FF}(Trabalhando)\n", sendername, lolz);
                              strcat(DialogThiago,string);
                        }
                        else
                        {
                            format(string, 128, "{98F5FF}%s {FFFFFF}[%s] {9AFF9A}(Jogando)\n", sendername, lolz);
                           strcat(DialogThiago,string);
                        }

                    }
                    else
                    {
                        format(string, 128, "{98F5FF}%s {FFFFFF}[%s] {FF4040}(Ausente)\n", sendername, lolz);
                        strcat(DialogThiago,string);
                    }
                    ShowPlayerDialog(playerid, 8789, DIALOG_STYLE_MSGBOX, "Administradores Online", DialogThiago, "Fechar", "");
                }
            }
        }
        return true;
    }
Obrigado des de jб


Re: Transformar Dialog em chat normal - DiReCt hIt - 14.01.2013

Sim, ao envйs de vocк usar strcat , use SendClientMessage .


Re: Transformar Dialog em chat normal - AlucardSnow - 15.01.2013

Eu uso MegaLife de Base toma:
pawn Код:
if (strcmp(cmd, "/admins", true) == 0)
    {
    SendClientMessage(playerid, 0xFF00FFAA, "[BWG] Admins Online:");
        for(new i = 0; i <= MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pAdmin] > 0)
            {
                if(admhide[i] == 0)
                {
                    GetPlayerName(i, sendername, sizeof(sendername));
                    new lolz[20];
                    if(PlayerInfo[i][pAdmin] == 1)
                    {
                        lolz = "Sub/Moderador";
                    }
                    if(PlayerInfo[i][pAdmin] == 2)
                    {
                        lolz = "Moderador";
                    }
                    if(PlayerInfo[i][pAdmin] == 3)
                    {
                        lolz = "Auxiliar";
                    }
                    if(PlayerInfo[i][pAdmin] == 4)
                    {
                        lolz = "Sub/Master";
                    }
                    if(PlayerInfo[i][pAdmin] == MASTER)
                    {
                        lolz = "Master";
                    }
                    if(PlayerInfo[i][pAdmin] == SUB_GERENTE)
                    {
                        lolz = "Sub/Gerente";
                    }
                    if(PlayerInfo[i][pAdmin] == GERENTE)
                    {
                        lolz = "Gerente";
                    }
                    if(PlayerInfo[i][pAdmin] == SUB_DONO)
                    {
                        lolz = "Sub/Dono";
                    }
                    if(PlayerInfo[i][pAdmin] == DONO)
                    {
                        lolz = "Dono";
                    }
                    if(away[i] == 0)
                    {
                        if(admtrampando[i] == 1)
                        {
                            format(string, 128, "{98F5FF}%s {FFFFFF}[%s] {98F5FF}(Trabalhando)\n", sendername, lolz);
                                SendClientMessage(playerid, 0xFFFFFFFF, string);
                        }
                        else
                        {
                            format(string, 128, "{98F5FF}%s {FFFFFF}[%s] {9AFF9A}(Jogando)\n", sendername, lolz);
                            SendClientMessage(playerid, 0xFFFFFFFF, string);
                        }

                    }
                    else
                    {
                        format(string, 128, "{98F5FF}%s {FFFFFF}[%s] {FF4040}(Ausente)\n", sendername, lolz);
                        SendClientMessage(playerid, 0x00FF00FF, string);
                    }
                   
                }
            }
        }
        return true;
    }



AW: Transformar Dialog em chat normal - lucasbjs0 - 15.01.2013

So de ver o teu /admins Ja Sei Que Voce usa ou o Brasil Mundo Novo ou o Brasil Play Facil!


Re: AW: Transformar Dialog em chat normal - AlucardSnow - 15.01.2013

Quote:
Originally Posted by lucasbjs0
Посмотреть сообщение
So de ver o teu /admins Ja Sei Que Voce usa ou o Brasil Mundo Novo ou o Brasil Play Facil!
Brasil Mega Life tbm pode ser


Re: Transformar Dialog em chat normal - Maklister - 15.01.2013

Da uma agonia olhar esses pedidos aqui no fуrum -q

e trocar por SendClientMessage


Re: Transformar Dialog em chat normal - tonisantolia - 15.01.2013

Quote:
Originally Posted by Murilo_sousa
Посмотреть сообщение
Da uma agonia olhar esses pedidos aqui no fуrum -q

e trocar por SendClientMessage
І

@topic

pawn Код:
new DialogThiago[1500];
Chega de ver GM BML sendo usando e.e