Wrap Text on Textdraw ?
#1

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(playeridszstring[], width)
{
    if(
strlen(szstring) > width)
    {
        new 
line1[110], line2[110], line3[110],line4[110],line5[110], string[110];
        
strmid(line1szstring018);
        
strmid(line2szstring1836);
        
strmid(line3szstring3654);
        
strmid(line4szstring5472);
        
strmid(line5szstring7290);
        
format(line1sizeof(line1), "%s"line1);
        
format(line2sizeof(line2), "%s"line2);
        
format(line2sizeof(line3), "%s"line3);
        
format(line1sizeof(line4), "%s"line4);
        
format(line2sizeof(line5), "%s"line5);
        
format(stringsizeof(string), "%s~n~%s~n~%s~n~%s~n~%s",line1,line2,line3,line4,line5);
        
TextDrawSetString(GPhone_TD[playerid][43], string);
        
TextDrawShowForPlayer(playeridGPhone_TD[playerid][43]);
    }

Reply
#2

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]);
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)