"SetObjectMaterialText" How to return to the line ?
#1

Hi

How to return to the line?

Look:


Reply
#2

IIRC...

It has to be a literal \n in the script. You can't, for example, do it via a command). You can use strReplace.
Reply
#3

Oh .. Yes exactly thank's

There is no way to directly IG ?
Reply
#4

i dont think there is any way in game.
Reply
#5

Код:
This code works:

format(string, sizeof(string),"Welcome to\nSan Fierro", PanneauInfo[id][textlabelMessage]);
SetDynamicObjectMaterialText(PanneauObject[id], 1, string, 100, "Arial", 45, 1, -1, 0x002B5433, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
Код:
This code not works:

string = "Welcome to\nSan Fierro";
strmid(PanneauInfo[i][textlabelMessage], string, 0, strlen(string), 255);

format(string, sizeof(string),"%s", PanneauInfo[id][textlabelMessage]);
SetDynamicObjectMaterialText(PanneauObject[id], 1, string, 100, "Arial", 45, 1, -1, 0x002B5433, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
I do not see the reason.
Reply
#6

@Ultrascipter: would'nt a double \\ work, too? oh, in the second example, like here:
Код:
string = "Welcome to\\nSan Fierro";
strmid(PanneauInfo[i][textlabelMessage], string, 0, strlen(string), 255);

format(string, sizeof(string),"%s", PanneauInfo[id][textlabelMessage]);
i guess its the parser causing it, ****** posted a whole chapter concerning that in one of his uncountable topics. i cant find it (ok, ok - in 20 seconds lol, but my question/argument is still valid ^^)
Reply
#7

Its not working either with double \\.

Look:

Код:
I succeeded with this code: new string [50]; if (PanneauInfo [id] [textlabelLigne] [0] == 1) format (string, sizeof (string), "%s", PanneauInfo [id] [textlabelMessage]); if (PanneauInfo [id] [textlabelLigne] [1] == 1) format (string, sizeof (string), "%s\n%s", PanneauInfo [id] [textlabelMessage], PanneauInfo [id] [textlabelMessage2]) ; if (PanneauInfo [id] [textlabelLigne] [2] == 1) format (string, sizeof (string), "%s\n%s\n%s", PanneauInfo [id] [textlabelMessage], PanneauInfo [id] [textlabelMessage2], PanneauInfo [id] [textlabelMessage3]); SetDynamicObjectMaterialText (PanneauObject [id], PanneauInfo [id] [textlabelIndex], string, PanneauInfo [id] [textlabelSize], "Arial", PanneauInfo [id] [textlabelTaille], 1, PanneauInfo [id] [textlabelTextColor], PanneauInfo [id] [textlabelFondColor], OBJECT_MATERIAL_TEXT_ALIGN_CENTER );
Look:

No more simple ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)