SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 24/02/2019, 02:39 PM   #1
kristo
Banned
 
Join Date: Jun 2012
Location: Estonia
Posts: 370
Reputation: 179
Default TextDraw Streamer* - No more textdraw limits!

https://www.**************/showthread.php?tid=75

Last edited by kristo; 16/04/2019 at 05:45 PM.
kristo is offline   Reply With Quote
Old 24/02/2019, 03:06 PM   #2
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,854
Reputation: 1292
Default Re: TextDraw Streamer* - No more textdraw limits!

Neat but I doubt anyone would ever really need this to be honest.
Pottus is offline   Reply With Quote
Old 24/02/2019, 03:08 PM   #3
Hazon
Big Clucker
 
Hazon's Avatar
 
Join Date: May 2018
Location: Who cares ?
Posts: 117
Reputation: 11
Default Re: TextDraw Streamer* - No more textdraw limits!

Quote:
Originally Posted by Pottus View Post
Neat but I doubt anyone would ever really need this to be honest.
Excatly, who's even using 2048 / 256 textdraws ? Maybe a handful of them in this world. In 7 years and I never cross the limit of the 30..
Hazon is offline   Reply With Quote
Old 24/02/2019, 03:08 PM   #4
kristo
Banned
 
Join Date: Jun 2012
Location: Estonia
Posts: 370
Reputation: 179
Default Re: TextDraw Streamer* - No more textdraw limits!

Quote:
Originally Posted by Pottus View Post
Neat but I doubt anyone would ever really need this to be honest.
Quote:
Originally Posted by Hazon View Post
Excatly, who's even using 2048 / 256 textdraws ? Maybe a handful of them in this world. In 7 years and I never cross the limit of the 30..
I needed it (well, for per-player textdraws, but it felt incomplete without the global ones), which is why I created it. From what I've heard, RC-RP is also close to the limit as TommyB experimented with the predecessor of this library. Even if only a handful of people need it, I've saved them the effort of creating this themselves.
kristo is offline   Reply With Quote
Old 24/02/2019, 03:13 PM   #5
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,854
Reputation: 1292
Default Re: TextDraw Streamer* - No more textdraw limits!

That's my point maybe one or two servers will actually ever need to use this. Then you will get people using it just for the sake of using it when they don't need it. As for the effort you don't really need it anyways it isn't hard to create/delete texdraws you are going to have a function for creating them at some point how long does it take to create a delete function? A couple of minutes nothing to it.
Pottus is offline   Reply With Quote
Old 24/02/2019, 03:21 PM   #6
NaS
High-roller
 
NaS's Avatar
 
Join Date: Mar 2008
Location: 🇩🇪
Posts: 1,638
Reputation: 537
Default Re: TextDraw Streamer* - No more textdraw limits!

Quote:
Originally Posted by Pottus View Post
Neat but I doubt anyone would ever really need this to be honest.
It does what many people do already with player textdraws - create and destroy them whenever needed.
With this you just have to worry about the visible limit without constantly creating and destroying player textdraws yourself, I'd argue it to be safer as well (at least it requires less effort to assure the script(s) delete all player TDs).

I have one little suggestion though - could you add an extra id?
Like (Player)TextDrawSet/GetExtraID?

That would be really neat for multiple purposes, for example lists/menus built with TextDraws. Instead of looping through the array of TextDraw IDs to find the list index for the "clickedid", you can just get the extra ID and know the index directly. Saves time and effort. This could also be used to completely avoid allocating arrays for TextDraw IDs if you add 2 extra ids (first for the type of TD, second for the index).

I have some more ideas for useful functions if you plan on expanding it, eg. toggling specific TDs for specific or all players, and toggling all TDs for specific players (seperately from showing/hiding them).

Really good include!
NaS is offline   Reply With Quote
Old 24/02/2019, 03:25 PM   #7
kristo
Banned
 
Join Date: Jun 2012
Location: Estonia
Posts: 370
Reputation: 179
Default Re: TextDraw Streamer* - No more textdraw limits!

Quote:
Originally Posted by NaS View Post
I have one little suggestion though - could you add an extra id?
Like (Player)TextDrawSet/GetExtraID?

That would be really neat for multiple purposes, for example lists/menus built with TextDraws. Instead of looping through the array of TextDraw IDs to find the list index for the "clickedid", you can just get the extra ID and know the index directly. Saves time and effort.

I have some more ideas for useful functions if you plan on expanding it, eg. toggling specific TDs for specific or all players, and toggling all TDs for specific players (seperately from showing/hiding them).
All suggestions are welcome, although I won't be updating it too soon since I'm still quite busy with school, I haven't even finished updating the GPS plugin yet. This has been on my GitHub for 2-3 months, it just didn't have a readme until now.
kristo is offline   Reply With Quote
Old 24/02/2019, 03:29 PM   #8
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,854
Reputation: 1292
Default Re: TextDraw Streamer* - No more textdraw limits!

I got a suggestion, add a grouping feature so you can hide/show groups of TD's.

Code:
PlayerText:CreatePlayerTextDraw(playerid, Float:x, Float:y, const text[], group=INVALID_TD_GROUP);
PlayerText:DestroyPlayerTextDrawGroup(group);
Pottus is offline   Reply With Quote
Old 24/02/2019, 03:35 PM   #9
FinStar
Big Clucker
 
Join Date: Nov 2013
Location: Instead of nothing
Posts: 154
Reputation: 0
Default Re: TextDraw Streamer* - No more textdraw limits!

Quote:
Originally Posted by Pottus View Post
I got a suggestion, add a grouping feature so you can hide/show groups of TD's.

Code:
PlayerText:CreatePlayerTextDraw(playerid, Float:x, Float:y, const text[], group=INVALID_TD_GROUP);
PlayerText:DestroyPlayerTextDrawGroup(group);
Yeah!
FinStar is offline   Reply With Quote
Old 24/02/2019, 05:07 PM   #10
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,854
Reputation: 1292
Default Re: TextDraw Streamer* - No more textdraw limits!

Here is another idea that could really help out is ordered overlapping by assigning dynamically changing orders in which groups of TD's are created you can control how TD's overlap and in which order. This is a big problem with textdraws and always has been and requires special considerations when creating scripts in the current state.
Pottus is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[TEXTDRAW] Help about limits. DeitY Scripting Help 4 29/11/2015 12:08 PM
[FilterScript] Simple speed limits signs [textdraw] xqz Filterscripts 1 06/09/2013 07:03 AM
TextDraw increase Limits? Skimmer Scripting Help 5 13/06/2013 08:46 PM
give me idea - TextDraw limits KoczkaHUN Help Archive 2 23/05/2011 05:32 AM
Textdraw's limits ... DokerJr Help Archive 1 25/10/2009 08:20 PM


All times are GMT. The time now is 04:55 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.