Textdraws Plugin? -
SmoW - 14.12.2015
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?
Re: Textdraws Plugin? -
dieuhanhphuc - 14.12.2015
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..
Re: Textdraws Plugin? -
SmoW - 14.12.2015
Quote:
Originally Posted by dieuhanhphuc
Use dialog, i think it's good.
What do you mean, "use around 25 per each connected player"
|
Every player that is online on the server will have at least 25 textdraws displayed on his screen.
Re: Textdraws Plugin? -
dieuhanhphuc - 14.12.2015
Quote:
Originally Posted by SmoW
Every player that is online on the server will have at least 25 textdraws displayed on his screen.
|
U're using PlayerTextDraw, right?
i think maybe u should use global TextDraw for not-changed Textdraw
Re: Textdraws Plugin? -
SmoW - 14.12.2015
Quote:
Originally Posted by dieuhanhphuc
U're using PlayerTextDraw, right?
i think maybe u should use global TextDraw for not-changed Textdraw
|
Yes I use PlayerTextDraw, but I need to use it like this since they are based only for EACH player's stats such as Hunger bar, Thirst bar etc-.., if I use Global ones, it will be a real mess
Re: Textdraws Plugin? -
dieuhanhphuc - 14.12.2015
Quote:
Originally Posted by SmoW
Yes I use PlayerTextDraw, but I need to use it like this since they are based only for EACH player's stats such as Hunger bar, Thirst bar etc-.., if I use Global ones, it will be a real mess
|
Textdraw is exactly like PlayerTextDraw, u can change the value of it too.
The difference is that textdraw is forced created in your mode, so it's used for all players, when u hide, it's still create.
About Playertextdraw, it can only create for one player, so only that player can use it, the other don't, so it help u save a little resources.
Depening on your purpose, u just choose 1 and use.
In your case, i think u should change your PlayerTextDraw to TextDraw
Re: Textdraws Plugin? -
AmigaBlizzard - 14.12.2015
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.
Re: Textdraws Plugin? -
Pottus - 15.12.2015
If you need more than 2048 textdraws you are not scripting correctly.
Re: Textdraws Plugin? -
DRIFT_HUNTER - 15.12.2015
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...
Re: Textdraws Plugin? -
dieuhanhphuc - 15.12.2015
Quote:
Originally Posted by DRIFT_HUNTER
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...
|
OMG, finally, hug me...my friend!!