Global textdraws or player textdraws?
#1

Hi guys...

I have a doubt. Before, one year ago, the global textdraw causing problems that required/forced to use the player textdraws. Today, with all the updates that occurred, is it still necessary? Or ready to use global textdraws without any problems?
Reply
#2

If you're showing something in the textdraw to somebody and something else in the same textdraw(Player status for example), then you must use per-player textdraw, if the string in the textdraw show the same thing to everybody, then use global.
Reply
#3

Global textdraws are for all, so you can have changes to it which will be uniform for all players. Only show or hide matters per player (you can see TextDrawShowForPlayer have a playerid param).

Whereas, player textdraws are per player, the param playerid makes it for a single player! So you can apply changes to them for a single individual.

Both these SAMP GUIs don't have any bugs or problems. Its always user's coding practice.
Reply
#4

Before player textdraws came out a few updates ago, people made textdraws like how player textdraws are made today. It all works the same in my opinion. But for example, if you create 4 Global Textdraws, assign an array of MAX_PLAYERS (defined 500 by default), that's 2000 textdraws, I believe the limit is 2048. So that leaves you with only 48 global textdraws remaining. If you create 4 Player Textdraws instead of Global ones, assign an array of MAX_PLAYERS, it's still 2000 textdraws, but you still have 252 Player Textdraws remaining per player as the limit for Player Textdraws is 256 per player.

In the long run, it's better to use Player TextDraws.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)