String replace
#1

I've heard of it somewhere, but I've never heard about it being used in this way.

I have a string, for example:
Код:
format(string, sizeof(string), "Hello, %s\n\nYou are really old.\n%s\n\nYeah that's right!", name, something);
I want to print this in chat, but since \n doesn't work there I probably need a function(?) to fix this issue.

What I want is this result:
Quote:

Hello Lenny

You are really old
Something

Yeah that's right!

In the text chat.


The reason I have it in a string is because I'm using it for a dialog, I just want to be able to print it in text too.
Reply
#2

SendClientMessages under each other eg:

SendClientMessage(playerid, COLOR, "Hi Boss");
SendClientMessage(playerid, COLOR, ""); // for an empty one
SendClientMessage(playerid, COLOR, "How are you");

as an example, you can ofc use your format to show other text there.
Reply
#3

Yes, but how do I divide the text into more than one string?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)