Textdraw showing question - 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: Textdraw showing question (
/showthread.php?tid=368253)
Textdraw showing question -
Killer#Mummy - 12.08.2012
Hi guys!
One simple question: I have a textdraw, which is shown for all players all the time. Now is it better to do TextDrawShowForPlayer when he connects and then TextDrawHideForPlayer when he disconnect, or is it better to do TextDrawShowForAll in OnGameModeInit??
Also, when I use TextDrawSetString, do I have to use TextDrawShowForPlayer to update it or it will update automaticlly?
Re: Textdraw showing question -
FalconX - 12.08.2012
Quote:
Originally Posted by Killer#Mummy
Hi guys!
One simple question: I have a textdraw, which is shown for all players all the time. Now is it better to do TextDrawShowForPlayer when he connects and then TextDrawHideForPlayer when he disconnect, or is it better to do TextDrawShowForAll in OnGameModeInit??
Also, when I use TextDrawSetString, do I have to use TextDrawShowForPlayer to update it or it will update automaticlly?
|
Hello Killer#Mummy,
When you use TextDrawSetString it automatically updates the TextDraw and there will be no need to update it with showing.
Secondly, about showing for all, I personally use TextDrawShowForPlayer in OnPlayerConnect and then hide it in OnPlayerDisconnect. I haven't experimented TextDrawShowForAll in GameModeInit yet (being honest).