SA-MP Forums Archive
Do we have to call PlayerTextDrawDestroy here ? - 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: Do we have to call PlayerTextDrawDestroy here ? (/showthread.php?tid=519604)



Do we have to call PlayerTextDrawDestroy here ? - LeaveMe - 15.06.2014

I'm creating player textdraws when a player connects at OnPlayerConnect.
I want to know do I have to destroy the textdraw when player disconnects at OnPlayerDisconnect or sa-mp server takes care about this automatically ?


Re: Do we have to call PlayerTextDrawDestroy here ? - Xeinss - 15.06.2014

you need to do PlayerTextDrawDestroy at OnPlayerDisconnect


Re: Do we have to call PlayerTextDrawDestroy here ? - HeLiOn_PrImE - 15.06.2014

If it's not global, I suggest you destroy it, because the current server version doesn't support more than 2000 textdraws.
The player doesn't see the textdraw on disconnect, but the sever keeps it there if you don't destroy it.


AW: Do we have to call PlayerTextDrawDestroy here ? - Nero_3D - 15.06.2014

No you don't need to destroy them, PlayerTextDraws and PVars are automatically deleted if the player disconnects
The sever supports 2048 global textdraws and additionally 256 PlayerTextDraws per Player


Re: AW: Do we have to call PlayerTextDrawDestroy here ? - LeaveMe - 15.06.2014

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
No you don't need to destroy them, PlayerTextDraws and PVars are automatically deleted if the player disconnects
The sever supports 2048 global textdraws and additionally 256 PlayerTextDraws per Player
I also agree with you. However just to make sure do you have any source, wiki, etc for this ?


AW: Do we have to call PlayerTextDrawDestroy here ? - Nero_3D - 15.06.2014

These information can all be found on the wiki

https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw (last note)
And the limits
https://sampwiki.blast.hk/wiki/Limits