Wrap Text on Textdraw ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Wrap Text on Textdraw ? (
/showthread.php?tid=575597)
Wrap Text on Textdraw ? -
GatsbyTrieu - 28.05.2015
Like tittle how to make that. I just try but still not working here is my work. Anyone can help me with that pls ?
My eng is bad. Thank you.
PHP код:
MSWrap(playerid, szstring[], width)
{
if(strlen(szstring) > width)
{
new line1[110], line2[110], line3[110],line4[110],line5[110], string[110];
strmid(line1, szstring, 0, 18);
strmid(line2, szstring, 18, 36);
strmid(line3, szstring, 36, 54);
strmid(line4, szstring, 54, 72);
strmid(line5, szstring, 72, 90);
format(line1, sizeof(line1), "%s", line1);
format(line2, sizeof(line2), "%s", line2);
format(line2, sizeof(line3), "%s", line3);
format(line1, sizeof(line4), "%s", line4);
format(line2, sizeof(line5), "%s", line5);
format(string, sizeof(string), "%s~n~%s~n~%s~n~%s~n~%s",line1,line2,line3,line4,line5);
TextDrawSetString(GPhone_TD[playerid][43], string);
TextDrawShowForPlayer(playerid, GPhone_TD[playerid][43]);
}
}
Re: Wrap Text on Textdraw ? -
Gasman - 28.05.2015
pawn Код:
MSWrap(playerid, szstring[], width)
{
if(strlen(szstring) > width)
{
new line1[110], line2[110], line3[110],line4[110],line5[110], string[1024];
strmid(line1, szstring, 0, 18);
strmid(line2, szstring, 18, 36);
strmid(line3, szstring, 36, 54);
strmid(line4, szstring, 54, 72);
strmid(line5, szstring, 72, 90);
format(string, sizeof(string), "%s~n~%s~n~%s~n~%s~n~%s",line1,line2,line3,line4,line5);
TextDrawSetString(GPhone_TD[playerid][43], string);
TextDrawShowForPlayer(playerid, GPhone_TD[playerid][43]);
}
}