Textdraws questions - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Textdraws questions (
/showthread.php?tid=390791)
Textdraws questions -
andrew2695 - 08.11.2012
Hi, I use alot of textdraws and I like them so much. I'm making textdraw menus, stats in textdraws, etc. I was wondering if its better to create them at OnGameModeIni and then show and hide them or create and destroy them when its needed? For example, My stats command, When typing /stats it create textdraws and when I hide it, they get destroyed. I'm using TextDrawSetString. Will it cause more lag to create and destroy the tds?
Re: Textdraws questions -
nmader - 08.11.2012
ShowTextDraw(Textdraw);
HideTextDraw(Textdraw);
Etcetra.
Re: Textdraws questions -
andrew2695 - 08.11.2012
This is not the answer I'm waiting for.
Re: Textdraws questions -
[HK]Ryder[AN] - 08.11.2012
You should create then destroy the textdraws, because otherwise although they will be hidden, but they will still remain created, so if you create more textdraws further and continue hiding them lot of textdraws will be there which will result in lag
Re: Textdraws questions -
Lordzy - 08.11.2012
You could use timers to show textdraw for a limited interval of time specified while using /stats command.