SA-MP Forums Archive
Textdraw GUI dissapears - 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: Textdraw GUI dissapears (/showthread.php?tid=481124)



Textdraw GUI dissapears - ||123|| - 14.12.2013

After some creating and destroying textdraws, it seems that uddenly the textdraws dissappear. And by disappear I mean they litteraly are not visible, either clickable. I think this is because Im creating destroying too many textdraws very often. What's going on?


Re: Textdraw GUI dissapears - Tagathron - 14.12.2013

Important Notes:

Maximum length of textdraw is 800 characters. Longer text will crash the client.
If you use color codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw.
If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.
text[] must NOT be empty or the server will crash! If you need a textdraw that shows nothing, use " " (a space) or _ (underscore)
If the last character in the text is a space (" "), the text will all be blank.
If part of the text is off-screen, the colour of the text will not show, only the shadow (if enabled) will.
Notes:

The x,y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using TextDrawAlignment with alignment 3 (right), the x,y coordinate is the top right coordinate for the text draw.
This function merely CREATES the textdraw, you must use TextDrawShowForPlayer to show it.


Re: Textdraw GUI dissapears - Vince - 14.12.2013

There really aren't many instances where it is useful to destroy a textdraw since they usually need to reappear later. What are you trying to achieve?


Re: Textdraw GUI dissapears - ||123|| - 14.12.2013

Quote:
Originally Posted by Vince
Посмотреть сообщение
There really aren't many instances where it is useful to destroy a textdraw since they usually need to reappear later. What are you trying to achieve?
It's a GUI for a screen I'm making. Every click changes textdraws. Somewhere I read earlier, it said that you don't destroy a created textdraw, it will crreate alot of unneccessary textdraws. (I was using textdrawhide)


Re: Textdraw GUI dissapears - ||123|| - 14.12.2013

Help


Re: Textdraw GUI dissapears - Pottus - 14.12.2013

Quote:
Originally Posted by Vince
Посмотреть сообщение
There really aren't many instances where it is useful to destroy a textdraw since they usually need to reappear later. What are you trying to achieve?
Agree with this point 100 percent, if your deleting textdraws it should be for a good reason namely playertextdraws which are automatically destroyed when a player logs out which means you'll almost never need to delete textdraws unless it's in OnGameModeExit().

Note: Using OnGameModeExit() will often cause client bugs I recommend a auto-restart script so you might not need to ever delete textdraws.

I'll have to dig out my post on organizing textdraws.