13.02.2013, 13:57
Hi
How to return to the line?
Look:
How to return to the line?
Look:
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);
string = "Welcome to\\nSan Fierro"; strmid(PanneauInfo[i][textlabelMessage], string, 0, strlen(string), 255); format(string, sizeof(string),"%s", PanneauInfo[id][textlabelMessage]);
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 );