SA-MP Forums Archive
Textdraw 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 question (/showthread.php?tid=556297)



Textdraw question - Supermaxultraswag - 10.01.2015

Код HTML:
public OnPlayerUpdate(playerid)
{
if (3000<= n {
       PlayerTextDrawShow(playerid, Gz[playerid]);
}
	return 1;

}
How can I make Textdraw "Gz" show only once?


Re: Textdraw question - Supermaxultraswag - 10.01.2015

Anybody? I need help really quick


Re: Textdraw question - LivingLikeYouDo - 10.01.2015

Don't use OnPlayerUpdate for stuff like textdraws, especially when you need to show it once. That's a BAD example of scripting, as player updates get call every second or something like that, so yeah, expect lag.

To make it show once. Use a timer, when the timer is called, show the textdraw and set a new timer for x milliseconds you want to show the textdraw, and on that textdraw, hide the textdraw. Make a variable and check if a player has already seen the textdraw.
That's all I understood from your post. Try to be more clearer next time.


Re: Textdraw question - Supermaxultraswag - 10.01.2015

Код HTML:
forward Timer(playerid);
public Timer(playerid)
{
new show;
if (3000<= n) 
{
if(show != 1)
{
PlayerTextDrawShow(playerid, Gz[playerid]);
}
show=1;
	return 1;

}
Is this way OK?


Respuesta: Textdraw question - Thewin - 10.01.2015

or

PHP код:
stock Show(playerid)
{
   if (
3000<= PlayerTextDrawShow(playeridGz[playerid]); }




Re: Respuesta: Textdraw question - Supermaxultraswag - 10.01.2015

Quote:
Originally Posted by Thewin
Посмотреть сообщение
or

PHP код:
stock Show(playerid)
{
   if (
3000<= PlayerTextDrawShow(playeridGz[playerid]); }

And how did you make it show only once?