Textdraw question
#1

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

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

Anybody? I need help really quick
Reply
#3

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.
Reply
#4

Код 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?
Reply
#5

or

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

Reply
#6

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

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

And how did you make it show only once?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)