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



DIALOG_STYLE_MSGBOX - SouUmaJujuba - 13.10.2013

Estava aqui fazendo algumas coisas com o DIALOG_STYLE_MSGBOX mas o tamanho da mensagem que eu estou tentando enviar й muito longa e fica dando erro, entгo gostaria de saber se tem como enviar a mesma mensagem sem erros.



Re: DIALOG_STYLE_MSGBOX - Coe1 - 13.10.2013

Usa strcat.

https://sampwiki.blast.hk/wiki/Strcat


Re: DIALOG_STYLE_MSGBOX - arakuta - 13.10.2013

Se nгo precisar de formataзгo use a '\' (Escape Character)

Por exemplo:

pawn Код:
SendClientMessage(playerid,-1,"Meu Texto\
й Legal."
);



Re: DIALOG_STYLE_MSGBOX - iTzDemon - 13.10.2013

ou podes fazer por string

pawn Код:
new string[999],string1[999],string2[999],string3[999],string4[999],string5[999];
format(string1,sizeof(string1),"SOU TODO BOM");
format(string2,sizeof(string2),"SOU TODO BOM");
format(string3,sizeof(string3),"SOU TODO BOM");
format(string4,sizeof(string4),"SOU TODO BOM");
format(string5,sizeof(string5),"SOU TODO BOM");
format(string1,sizeof(string1),"%s\n%s\n%s\n%s\n%s",string1,string2,string3,string4,string5);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "stats", string, "Fechar", "");



Re: DIALOG_STYLE_MSGBOX - PT - 13.10.2013

Quote:
Originally Posted by iTzDemon
Посмотреть сообщение
ou podes fazer por string

pawn Код:
new string[999],string1[999],string2[999],string3[999],string4[999],string5[999];
format(string1,sizeof(string1),"SOU TODO BOM");
format(string2,sizeof(string2),"SOU TODO BOM");
format(string3,sizeof(string3),"SOU TODO BOM");
format(string4,sizeof(string4),"SOU TODO BOM");
format(string5,sizeof(string5),"SOU TODO BOM");
format(string1,sizeof(string1),"%s\n%s\n%s\n%s\n%s",string1,string2,string3,string4,string5);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "stats", string, "Fechar", "");
Quote:
Originally Posted by PT
Посмотреть сообщение
isso n ta bem, melhor assim:

pawn Код:
CMD:teste(playerid)
{
    new PT[60];
    strcat(PT, "oouo lindo\n", sizeof(PT));
    strcat(PT, "oouo lindo\n", sizeof(PT));
    strcat(PT, "oouo lindo\n", sizeof(PT));
    ShowPlayerDialog(playerid, NOME_DA_DIALOG, DIALOG_STYLE_MSGBOX, "teste", PT, "OK", "");
    return 1;
}
melhor ter atencao ao que ta a fazer


Re: DIALOG_STYLE_MSGBOX - Juniiro3 - 13.10.2013

Quote:
Originally Posted by arakuta
Посмотреть сообщение
Se nгo precisar de formataзгo use a '\' (Escape Character)

Por exemplo:

pawn Код:
SendClientMessage(playerid,-1,"Meu Texto\
й Legal."
);
Eu tentei assim, mas usar \ continua sendo a mesma linha eu acho, entгo vai continuar ficando longa. Eu fiz isso ( \ ) com todas as linhas do Dialog, elas ficaram bem curtas, e mesmo assim tive o erro. O melhor seria usar strcat mesmo.


Re: DIALOG_STYLE_MSGBOX - shittt - 13.10.2013

Bom sempre utilizei ' \ ' para nгo formatar .. recomendo se vocк nao quer formatar mais se quizer usa strcat