SA-MP Forums Archive
Textdraws and memory - 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 and memory (/showthread.php?tid=344762)



Textdraws and memory - mprofitt - 22.05.2012

If you have 100+ per player textdraws, used quite often, with 30+ shown at a time, it is best to store them in variables or destroy and create as needed.

If destroy / create method is used will there be draw latency on the client?


Re: Textdraws and memory - iggy1 - 22.05.2012

I'd say it's best to store them in global vars. It's less efficient to create / destroy them continuously. If they are going to be shown most of the time create them in OnGameModeInit (or fsinit) and show / hide when needed. Your not taking much of a memory hit with a couple hundred textdraws anyway.