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



abrir em dialog - NascimentoRJ - 30.06.2016

Oi, gostaria de saber como faзo para esses comandos aparecer em janela dialog.... ao invйs de sendcliente...

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
    {

    new string[256];
    if(!strcmp(cmdtext, "/comandos", true))
    {

    SendClientMessage(playerid, 0xDF0016FF, "=========================PRINCIPAIS COMANDOS=========================");
    SendClientMessage(playerid, LARANJA,     "Quer se divertir nos teleportes (/Teles)");
    SendClientMessage(playerid, LARANJA,     "Para sintonizar alguma rбdio (/Radios)");
    SendClientMessage(playerid, LARANJA,     "Quer tocar o terror no server? (/Tocarterror)");
    SendClientMessage(playerid, LARANJA,     "Para cometer suicidio (/Kill)");
    SendClientMessage(playerid, LARANJA,     "Ver o nъmero de players online (/Online)");
    SendClientMessage(playerid, LARANJA,     "Crйditos do servidor (/Creditos)");
    SendClientMessage(playerid, 0xDF0016FF, "=========================PRINCIPAIS COMANDOS=========================");
    return 1;
    }
//------------------------------------------------------------------------------------------------------
    if(!strcmp(cmdtext, "/teles", true))
    {

    SendClientMessage(playerid, 0x03F2FFFF, "=========================TELESPORTES=========================");
    SendClientMessage(playerid, AZUL,     "Dm's: /Sniper");
    SendClientMessage(playerid, AZUL,     "Parkours: /Pmonster");
    SendClientMessage(playerid, AZUL,     "Diversгo: /Praia");
    SendClientMessage(playerid, 0x03F2FFFF, "=========================TELEPORTES=========================");
    return 1;
    }



Re: abrir em dialog - XandyMello - 30.06.2016

pawn Код:
if(!strcmp(cmdtext, "/comandos", true))
    {
        ShowPlayerDialog(playerid, 5021, DIALOG_STYLE_MSGBOX, "PRINCIPAIS COMANDOS", "Quer se divertir nos teleportes (/Teles)\nPara sintonizar alguma rбdio (/Radios)\nQuer tocar o terror no server? (/Tocarterror)\nVer o nъmero de players online (/Online)\nCrйditos do servidor (/Creditos)", "Entendi", "");
        return 1;
    }
pawn Код:
if(!strcmp(cmdtext, "/teles", true))
    {
        ShowPlayerDialog(playerid, 40, DIALOG_STYLE_MSGBOX, "TELESPORTES", "Dm's: /Sniper\nParkours: /Pmonster\nDiversгo: /Praia", "Entendi", "");
        return 1;
    }



Re: abrir em dialog - NascimentoRJ - 30.06.2016

Beleza Xandy, como posso colocar cor no titulo e nas frases? diga-me um exemplo por favor ?


Re: abrir em dialog - NascimentoRJ - 30.06.2016

Quero botar cor na parte do titulo, e nas frases dentro da dialog.. os botoes irгo ficam normal


Re: abrir em dialog - XandyMello - 30.06.2016

pawn Код:
if(strcmp(cmd, "/exemplo", true) == 0)
{
    new string[300], string2;
    format(string2, sizeof(string2), "\n{F7FE2E}exemplo");
    strcat(string,string);
    format(string2, sizeof(string2), "\n{FF0000}exemplo 2");
    strcat(string,string2);
    ShowPlayerDialog(playerid,11112,DIALOG_STYLE_MSGBOX, "{F7FE2E}Tнtulo", string, "Ok", "Cancelar");
    return 1;
}
use essa forma para por cores.


Re: abrir em dialog - NascimentoRJ - 30.06.2016

nгo hб como colocar simplesmente {F7FE2E} antes da frase que eu quero ?


Re: abrir em dialog - XandyMello - 30.06.2016

Quote:
Originally Posted by NascimentoRJ
Посмотреть сообщение
nгo hб como colocar simplesmente {F7FE2E} antes da frase que eu quero ?
Dar sim.