SA-MP Forums Archive
PlayerTextDrawSetString huge issue - 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: PlayerTextDrawSetString huge issue (/showthread.php?tid=482090)



PlayerTextDrawSetString huge issue - ||123|| - 19.12.2013

I'm using PlayerTextDrawSetString on Onplayertext. There's a point in my script where the player types in something, and it has to be showed using textdraws in the right side of the screen. The string from Onplayertext is then divided between 4 textdraws and showed one below the another. The problem is that sometimes a line of textdraw goes blank and nothing is showed. It's because the line is either started by a space, or ended by one. How can I get through this problem. As you woudn't know when a player's entering a space and sometimes the spaces between words are cut in the first line and showed in the second. Let me explain:
The player types in the following words: "Hey, it's been a long time since we met bro." the string length from 0-15 is used in the first textdraw and 15-30 in the second, it goes on. The first textdraw will have the following string content "Hey, it's been " notice the space in the end. this causes the textdraw to go blank, and happens the same if the textdraw is starting with a space. How can I solve this issue? Maybe a function that removes all spaces before and after the actual texts. Thankyou.


Re: PlayerTextDrawSetString huge issue - Raza2013 - 19.12.2013

show the Textdraw Stuff


Re: PlayerTextDrawSetString huge issue - ||123|| - 19.12.2013

pawn Код:
new pmsg[4][33];
strmid(pmsg[0], inputtext, 0, 32);
strmid(pmsg[1], inputtext, 32, 64);
strmid(pmsg[2], inputtext, 64, 96);
strmid(pmsg[3], inputtext, 96, 128);

PlayerTextDrawSetString(playerid, textdraw[playerid][10], pmsg[0]);
PlayerTextDrawSetString(playerid, textdraw[playerid][11], pmsg[1]);
PlayerTextDrawSetString(playerid, textdraw[playerid][12], pmsg[2]);
PlayerTextDrawSetString(playerid, textdraw[playerid][13], pmsg[3]);



Re: PlayerTextDrawSetString huge issue - ||123|| - 19.12.2013

Please help.


Re: PlayerTextDrawSetString huge issue - Wizza - 19.12.2013

Set a timer using settimerex and then remove the textdraw for the player and then do this again.


Re: PlayerTextDrawSetString huge issue - ||123|| - 21.12.2013

wut?