SA-MP Forums Archive
[HELP] How to add new line - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] How to add new line (/showthread.php?tid=366111)



[HELP] How to add new line - anito - 05.08.2012

How can I solve this:
format(string, sizeof(string), "ONE TWO THREE");

Result: ONE TWO THREE

I want:
ONE
TWO
THREE

I tried: /n, ~n~, /r/n and nothing.

Thanks.


Re: [HELP] How to add new line - ReneG - 05.08.2012

New line for what?

New line for dialogs is \n
New line for gametext, and textdraws is ~n~


Re: [HELP] How to add new line - Syntax - 05.08.2012

Try and do it like this:

format(string, sizeof(string), "ONE!");
SendClientMessage(playerid,COLOR_RED,string);
format(string, sizeof(string), "TWO!");
SendClientMessage(playerid,COLOR_ORANGE,string);
format(string, sizeof(string), "THREE!");
SendClientMessage(playerid,COLOR_GREEN,string);


Re: [HELP] How to add new line - anito - 05.08.2012

I want it for my payday. But i cant figure it out.


Re: [HELP] How to add new line - iggy1 - 05.08.2012

Quote:
Originally Posted by Syntax
Посмотреть сообщение
Try and do it like this:
pawn Код:
format(string, sizeof(string), "ONE!");
SendClientMessage(playerid,COLOR_RED,string);
format(string, sizeof(string), "TWO!");
SendClientMessage(playerid,COLOR_ORANGE,string);
format(string, sizeof(string), "THREE!");
SendClientMessage(playerid,COLOR_GREEN,string);
Why not just do

pawn Код:
SendClientMessage(playerid,COLOR_GREEN,"ONE")
SendClientMessage(playerid,COLOR_GREEN,"TWO")
SendClientMessage(playerid,COLOR_GREEN,"THREE")



Re: [HELP] How to add new line - Universal - 05.08.2012

You cant make a new line in SendClientMessage, it displays text in a new line automatically, so just do whats mentioned above.


Re: [HELP] How to add new line - Misiur - 05.08.2012

VincentDunn already answered.
pawn Код:
format(string, sizeof(string), "ONE\nTWO\nTHREE");
@e: Oh, didn't see it was for SCM. My bad