01.07.2015, 11:51
hello, im confused on how make this newline work. I red on the forums the new line command is "~n~" I'm using it. yet the newline isn't working, its just changing the last string. I want to add string not change completly the last one. (trying to make news feed whenever something happens it will make newline and show the last message + new message)
Please help me figure out whats wrong.
Here is some code:
(textdraw FEED3 is the actual string which needs to be editted)
This is a string for example i want to be in the feed 3.
Noting worked so i have made this stock to try another way to add the strings, yet it didn't work.
Okay the codes should be enough to explain how im adding new lines to the FEED3 textdraw.
In-game It will show first string, when i need another it will change the last instead of adding new line..
EDIT: It seems like it works this way "string1~n~" when new string come it will change the last string to "string2~n~" but as you can see the ~n~ isn't appliad to the new string. Why?
Please help me figure out whats wrong.
Here is some code:
(textdraw FEED3 is the actual string which needs to be editted)
Код:
FEED3 = TextDrawCreate(407.999938, 346.785186, "%s~n~"); TextDrawLetterSize(FEED3, 0.176000, 0.977777); TextDrawAlignment(FEED3, 1); TextDrawColor(FEED3, 8388863); TextDrawSetShadow(FEED3, 0); TextDrawSetOutline(FEED3, 1); TextDrawBackgroundColor(FEED3, 51); TextDrawFont(FEED3, 1); TextDrawSetProportional(FEED3, 1);
Код:
new bstring[128]; format(bstring,sizeof(bstring), "%s has connected. (Countery: %s)", GetName(playerid), country); NewsFeedTextDraw(bstring);
Код:
stock NewsFeedTextDraw(text[]) { new bigstring[1024]; format(bigstring, sizeof(bigstring), "%s~n~", text); TextDrawSetString(FEED3, bigstring); }
In-game It will show first string, when i need another it will change the last instead of adding new line..
EDIT: It seems like it works this way "string1~n~" when new string come it will change the last string to "string2~n~" but as you can see the ~n~ isn't appliad to the new string. Why?