[HELP] How to add new line
#1

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.
Reply
#2

New line for what?

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

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);
Reply
#4

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

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")
Reply
#6

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)