SA-MP Forums Archive
which should i use ? TextDrawHideForPlayer or PlayerTextDrawDestroy - 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: which should i use ? TextDrawHideForPlayer or PlayerTextDrawDestroy (/showthread.php?tid=431507)



which should i use ? TextDrawHideForPlayer or PlayerTextDrawDestroy - dash5487 - 18.04.2013

hi
which should i use ? TextDrawHideForPlayer or PlayerTextDrawDestroy


Re: which should i use ? TextDrawHideForPlayer or PlayerTextDrawDestroy - HurtLocker - 18.04.2013

Use hide if you want to use the textdraw later without needing to recreate it. Use destroy if you won't need to use the textdraw again.


Re: which should i use ? TextDrawHideForPlayer or PlayerTextDrawDestroy - dash5487 - 18.04.2013

iwhat if player disconnect and i used TextDrawHideForPlayer it will be store in memory and soon make server laggy ? ? i must destroy it ?


Re: which should i use ? TextDrawHideForPlayer or PlayerTextDrawDestroy - MP2 - 18.04.2013

You don't need to destroy PLAYER-textdraws on disconnect as this is done automatically. You also don't need to hide a textdraw on disconnect (why would you do that? Can players see textdraws after quitting the game?).

If you want textdraws that are PER-player, you obviously shouldn't destroy the global textdraw unless it's only created for that player, in which case why not use a player-textdraw?