SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 24/02/2019, 07:51 PM   #11
DTV
Gangsta
 
DTV's Avatar
 
Join Date: Dec 2010
Posts: 545
Reputation: 125
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);
Please, this would be real useful!
__________________

DTV is offline   Reply With Quote
Old 24/02/2019, 11:05 PM   #12
kristo
Banned
 
Join Date: Jun 2012
Location: Estonia
Posts: 370
Reputation: 179
Default Re: TextDraw Streamer* - No more textdraw limits!

Updated, NaS implemented extra IDs.

Code:
TextDrawSetExtraID(Text:text, extra1, extra2 = INVALID_TEXTDRAW_EXTRA_ID);
TextDrawGetExtraID(Text:text, &extra1, &extra2 = INVALID_TEXTDRAW_EXTRA_ID);

PlayerTextDrawSetExtraID(playerid, PlayerText:text, extra1, extra2 = INVALID_TEXTDRAW_EXTRA_ID);
PlayerTextDrawGetExtraID(playerid, PlayerText:text, &extra1, &extra2 = INVALID_TEXTDRAW_EXTRA_ID);
kristo is offline   Reply With Quote
Old 25/02/2019, 04:38 AM   #13
Damian
Beta Tester
 
Join Date: Jan 2006
Posts: 112
Reputation: 169
Default Re: TextDraw Streamer* - No more textdraw limits!

Following.
Damian is offline   Reply With Quote
Old 25/02/2019, 04:14 PM   #14
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,851
Reputation: 1292
Default Re: TextDraw Streamer* - No more textdraw limits!

Quote:
Originally Posted by ****** View Post
So z-indexes?
Precisely for TD's you create them with lowest priority first to highest.

@Edit one more quick note when pressing ESC should close textdraws in order highest priority to lowest.
Pottus is offline   Reply With Quote
Old 25/02/2019, 05:30 PM   #15
Riddick94
Banned
 
Join Date: Mar 2010
Location: Poland
Posts: 1,794
Reputation: 223
Default Re: TextDraw Streamer* - No more textdraw limits!

https://i.imgur.com/9BaF3CC.png

I'm at the limit nearly. I could be over the limit already, if I didn't switch onto global tds with arrays.
Riddick94 is offline   Reply With Quote
Old 25/02/2019, 05:34 PM   #16
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,851
Reputation: 1292
Default Re: TextDraw Streamer* - No more textdraw limits!

Quote:
Originally Posted by Riddick94 View Post
https://i.imgur.com/9BaF3CC.png

I'm at the limit nearly. I could be over the limit already, if I didn't switch onto global tds with arrays.
I can almost guarantee you are using TD's incorrectly then. You must have a shit load of player td's that should actually be global. 100 global and 235 player I know that is fucked up just by looking at it.

@Edit
Some more gripes with this include.

- Instead of arbitrarily just shoving textdraws into the streamer let the user choose if the td will actually be streamed or not! I thought about this quite a bit it makes absolutely no sense to have to stream ALL textdraws why would you? It makes sense that only lower priority less used systems would need to be streamed.

- This ties into the first point. How many textdraw slots or player textdraw slots do you really need for effective streaming? Certainly not all of them! That would be a shit load of extra overhead for nothing. Destroying/Creating is a slow process when it comes to updating clients with newly created TD's.

- Stuff like extra id's would still be beneficial so even if TD's are not streamed this system goes beyond being just a streamer but capable of handling native functions in a powerful sub-system controller.

- Features like grouping and as ****** pointed out the correct term z-indexes extends functionality to the makings of a GUI controller.

Last edited by Pottus; 25/02/2019 at 07:03 PM.
Pottus is offline   Reply With Quote
Old 25/02/2019, 07:30 PM   #17
Riddick94
Banned
 
Join Date: Mar 2010
Location: Poland
Posts: 1,794
Reputation: 223
Default Re: TextDraw Streamer* - No more textdraw limits!

Quote:
Originally Posted by Pottus View Post
I can almost guarantee you are using TD's incorrectly then. You must have a shit load of player td's that should actually be global. 100 global and 235 player I know that is fucked up just by looking at it.

[...]
You could have said that back a year ago, but not when I have decided to work on it from scratch again last year January, doing it all logically.

Older version of my gamemode, was using only PlayerTextDraws and I had an issue with the limits but, right now it's been worked enough without allowing me compressing it anymore or at least not that much.

TLoU (SA-MP) uses a lot of textdraws..

Global is about ~1000 lines (for loops)
https://i.imgur.com/DlkQGBC.png

Per-Player are about 1300 lines (not a lot of lines because most of them are in for-loops)
https://i.imgur.com/01kV8L3.png
Riddick94 is offline   Reply With Quote
Old 25/02/2019, 08:04 PM   #18
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,851
Reputation: 1292
Default Re: TextDraw Streamer* - No more textdraw limits!

I can't tell anything with that, if I saw the code I would know if there was anything that could be better. I wouldn't worry about people seeing your code either it is the lamest thing to worry about.
Pottus is offline   Reply With Quote
Old 01/03/2019, 03:26 PM   #19
Felipe_Freeze
Huge Clucker
 
Felipe_Freeze's Avatar
 
Join Date: Dec 2011
Posts: 455
Reputation: 36
Default Re: TextDraw Streamer* - No more textdraw limits!

Very good!
__________________

DEVELOPER
Brasil

Ruby on Rails
Felipe_Freeze is offline   Reply With Quote
Old 02/03/2019, 05:29 AM   #20
SymonClash
Banned
 
Join Date: Dec 2018
Posts: 257
Reputation: 25
Default Re: TextDraw Streamer* - No more textdraw limits!

Quote:
Originally Posted by Riddick94 View Post
You could have said that back a year ago, but not when I have decided to work on it from scratch again last year January, doing it all logically.

Older version of my gamemode, was using only PlayerTextDraws and I had an issue with the limits but, right now it's been worked enough without allowing me compressing it anymore or at least not that much.

TLoU (SA-MP) uses a lot of textdraws..

Global is about ~1000 lines (for loops)
https://i.imgur.com/DlkQGBC.png

Per-Player are about 1300 lines (not a lot of lines because most of them are in for-loops)
https://i.imgur.com/01kV8L3.png
Stupid question:

What's the point on hiding textdraw codes?
SymonClash 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 01:24 PM.


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