SA-MP Forums Archive
Textdraws - 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: Textdraws (/showthread.php?tid=434962)



Textdraws - TKZ227 - 04.05.2013

What is the difference between a player text-draw and a global text-draw?

If I were trying to create a menu out of textdraws that would show for the player everytime they press a certain button, should I use global or player textdraws? The menu will be the same for the majority of players.


Re: Textdraws - DaRk_RaiN - 04.05.2013

Basically the same, only that Player textdraws destroy when the player disconnects.
Wiki page with deeper explanation: https://sampwiki.blast.hk/wiki/Textdraw


Re: Textdraws - TKZ227 - 04.05.2013

Quote:
Originally Posted by DaRk_RaiN
View Post
Basically the same, only that Player textdraws destroy when the player disconnects.
Wiki page with deeper explanation: https://sampwiki.blast.hk/wiki/Textdraw
So for the use I described (a menu that a player sees when they press a button) would it be best to use a global textdraw or player textdraw?


Re: Textdraws - DaRk_RaiN - 04.05.2013

I'd go with player textdraw if it differs for each player, if it's the same for all a global one.


Re: Textdraws - MP2 - 04.05.2013

Another advantage is that you can have 256 player-textdraws per player, as opposed to the global limit of 2048, allowing you to 'bypass' the limit. The fact that only 92 textdraws can be displayed at a time mean it's more than enough,


Re: Textdraws - Scenario - 04.05.2013

You CAN add a [playerid] tag to global text-draws if you really wanted to. However, it's quite pointless since you'll never need to have 256 text-draws actually loaded 100% of the time a player is on the server. I add/remove text-draws for my players depending on when I need them.