24.02.2019, 14:39
(
Последний раз редактировалось kristo; 16.04.2019 в 17:45.
)
Neat but I doubt anyone would ever really need this to be honest.
|
Neat but I doubt anyone would ever really need this to be honest.
|
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). |
PlayerText:CreatePlayerTextDraw(playerid, Float:x, Float:y, const text[], group=INVALID_TD_GROUP); PlayerText:DestroyPlayerTextDrawGroup(group);
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);
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.
[...] |
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 |