TextDraw help
#6

If you're using the textdraw globally, which it looks like, there's no need to use SetTimerEx.
Here's an example to set up your timer:
Where you display the textdraw, start the timer
pawn Код:
SetTimer("MyPublic", 4000, false);
"MyPublic" - The public the timer will call when it ends
4000 - The time it takes before the public is called
false - A boolean(true/false) if the timer should repeat or not, we don't want it to repeat, just be called once, so we use false

Now the public:
pawn Код:
forward MyPublic(); // When creating a public function, you always need to forward it
public MyPublic() // The public the timer will call, any code under the public will be executed when the timer ends
{
    foreach(new i: Player) // Loop through all players, assuming you have the textdraw globally for all players
    {
        TextDrawHideForPlayer(i, Textdraw0); // Hide the textdraw for all players, "i"
    }
}
If you only have the textdraw for 1 person at a time, you should use [playerid] on your variable, as well as SetTimerEx.
If you're using it for a cmd etc:

/welcomeall
Loop through all players and show the textdraw


Then just set the public up like in the example.
Reply


Messages In This Thread
TextDraw help - by Bulgaria - 01.04.2015, 14:59
Re: TextDraw help - by CalvinC - 01.04.2015, 15:02
Re: TextDraw help - by Bulgaria - 01.04.2015, 15:03
Re: TextDraw help - by Ritzy2K - 01.04.2015, 15:04
Re: TextDraw help - by Bulgaria - 01.04.2015, 15:09
Re: TextDraw help - by CalvinC - 01.04.2015, 15:24
Re: TextDraw help - by Bulgaria - 01.04.2015, 15:31
Re: TextDraw help - by CalvinC - 01.04.2015, 15:38
Re: TextDraw help - by Bulgaria - 01.04.2015, 15:43
Re: TextDraw help - by CalvinC - 01.04.2015, 15:48

Forum Jump:


Users browsing this thread: 4 Guest(s)