PlayerTextDraw Streamer v1.1 -
theYiin - 09.11.2014
SA-MP TextDraws limit per player is 256. It means, that you can create only 256 texdraws per player (doh).
Because I exceed that limit, you get this include ^^
pawn Код:
#define LIMIT_OF_PLAYER_TEXT_DRAWS 1000 // The new limit of PlayerTextDraw's
You can only show maximum 256 of playertextdraws at once on player screen!
Usage:
1. Download:
http://pastebin.com/iHFgG6Ai
2. Save code to
PlayerTextDrawStreamer.inc file
3. Put this file to pawno/includes folder.
4. On the top of gamemode put #include <PlayerTextDrawStreamer>
5.
OnPlayerClickPlayerTextDraw callback located in your GM file rename to OnPlayerClickPTextdraw
6. Compile GM. That's all.
Update log:
v1.1 - Fixed OnPlayerClickPlayerTextDraw hook.
v1.0 - Added OnPlayerDisconnect hook to destroy any created player textdraws
v0.9 - initial release
Write your questions and found bugs (shouldn't be any) in this thread.
Re: PlayerTextDraw Streamer -
LorDWarS - 09.11.2014
good job!
Re: PlayerTextDraw Streamer -
Pottus - 09.11.2014
Seems like a of extra overhead to me, if you have more than 256 player textdraws your probably ignoring the fact of using global textdraws for any static textdraws. It could be useful in certain circumstances but you would actually have to have over 256 player textdraws before that happens and again with proper textdraw management that isn't easy to reach.
Re: PlayerTextDraw Streamer -
theYiin - 09.11.2014
Quote:
Originally Posted by Pottus
Seems like a of extra overhead to me, if you have more than 256 player textdraws your probably ignoring the fact of using global textdraws for any static textdraws. It could be useful in certain circumstances but you would actually have to have over 256 player textdraws before that happens and again with proper textdraw management that isn't easy to reach.
|
It totally depends on what you are drawing.
Inventory:
new Text:TD.Inventory[14];
new PlayerText: pTD.Inventory[MAX_PLAYERS][53];
pic:
http://i.imgur.com/HY0DMUn.jpg
Container:
new Text:TD.Container[21];
new PlayerText:pTD.Container.Left[MAX_PLAYERS][46];
new PlayerText:pTD.Container.Right[MAX_PLAYERS][45];
pic:
http://i.imgur.com/8sPndjP.jpg
Garage:
new Text:TD.Garage[44];
new PlayerText:pTD.Garage[23][MAX_PLAYERS];
pic:
http://i.imgur.com/SkK13HF.jpg
not counting other things.
Stuff like this requires a lot of textdraws.
Respuesta: PlayerTextDraw Streamer -
!R1Ch@rD! - 09.11.2014
good work
Re: PlayerTextDraw Streamer -
Pottus - 09.11.2014
That is why I said it could be useful in certain circumstances lol.
Re: PlayerTextDraw Streamer -
xStunt - 09.11.2014
Nice include!
Re: PlayerTextDraw Streamer -
theYiin - 09.11.2014
Updated:
http://pastebin.com/iHFgG6Ai
Re: PlayerTextDraw Streamer -
Raimis_R - 10.11.2014
Good jo my friend.
Re: PlayerTextDraw Streamer -
kristo - 17.11.2014
Why did you use ALS to hook OnPlayerDisconnect but y_hooks to hook OnPlayerClickPlayerTextDraw?