Posts: 38
Threads: 7
Joined: Dec 2015
Reputation:
0
Just wondering, is there any plugin that lets you have over the limit of 2.048 textdraws in SA:MP? I'm making an RP server and I use a lot of textdraws, around 25 per each connected player, displayed at the same time. Any suggestions on how to reduce this number or increase the limit?
Posts: 59
Threads: 17
Joined: Mar 2013
Reputation:
0
Use dialog, i think it's good.
What do you mean "use around 25 per each connected player"?
I think it's only count when you create in your mode..
Posts: 319
Threads: 7
Joined: Jul 2012
Reputation:
0
Using Global textdraws for player-specific text is asking for trouble.
These are only good when you want to show something to all players at once, like an announcement.
TextDrawSetString sets the text and updates it for all players where the textdraw is being shown.
Details like colors or font only update on your screen after using the appropriate editing functions followed by TextDrawShowForPlayer.
For player-specific text like HP, hunger, ... use playertextdraws.
You can have up to 256 of them PER PLAYER at once.
With 100 players, that's 25600 textdraws, which should be enough.
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
If you need more than 2048 textdraws you are not scripting correctly.
Posts: 2,203
Threads: 154
Joined: Oct 2009
Reputation:
0
Two types of textdraws. Globals, and player based. Each player can see 1024 global and 1024 player textdraws.
Player based textdraws are only for one player, so creating 50 textdraws for one player, does not mean that you have 50 textdraws less for other players, as that textdraws are not meant for them.
TextDrawSetString belongs to global textdraw functions, and it only changes the string of the textdraw. If you want player to see that new string, you need to call TextDrawShowForPlayer or TextDrawShowForAll function (if textdraw is already shown, it will just update it).
Things specific for player are supposed to be created with Player Textdraws (like hunger, score, etc..) Things that are same for everyone like team score, server name, or just some info on screen like random messages for everyone, that is supposed to be created with global textdraws.
Also if you are so short on textdraws, create player textdraws only when you need them, and delete when you dont...