Textdraws
#1

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.
Reply
#2

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

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?
Reply
#4

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

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,
Reply
#6

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)