[Ajuda] Exibir texto formatado - 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] Exibir texto formatado (
/showthread.php?tid=421469)
Exibir texto formatado -
Gustavo Aguiar - 09.03.2013
Eu tenho um texto formatado salvo em ServerConfig[playerid][svRegras].
Код:
-Й proibido drive-by\n-Й proibido matar em areas de spawn\n-Й proibido...
Ele й salvo em ServerConfig[playerid][svRegras] por:
pawn Код:
cache_get_field_content(0,"Regras",svQuery,gSQL);
format(ServerConfig[playerid][svRegras], 900, svQuery);
(o texto esta em vachar no mysql)
pawn Код:
enum SV_INFO
{
xxxxx,
xxxxxxxxx,
svRegras[900],
xxxxxxxx[500]
}
new ServerConfig[MAX_PLAYERS][SV_INFO];
E aqui exibe o texto:
pawn Код:
stock Regras(playerid)
{
new string[900];
format(string,sizeof(string),"%s", ServerConfig[playerid][svRegras]);
return string;
}
Estб tudo funcionando certinho sу que estб exibindo a formataзгo (\n) como se fosse texto:
Код:
-Й proibido drive-by\n-Й proibido matar em areas de spawn\n-Й proibido...
E o que eu quero й exibir assim:
Код:
-Й proibido drive-by
-Й proibido matar em areas de spawn
-Й proibido...
Help-me!
Re: Exibir texto formatado -
Kuddy - 09.03.2013
Nunca usei MySQL no SA-MP, mas por que diabos vc ta repetindo a mesma string 500 vezes?
--
Quanto а sua dъvida: vocк estб usando dialog ou mensagens comuns (SendClientMessage) ?
Se for mensagem comum, vocк tem que usar uma funзгo SendClientMessage para cada linha.