Cant Figure out (Textdraw Timer) -
Ritzy2K - 17.02.2015
Hi, Hows everyone? i was good before i realized that im still nab at scripting.. i cant figure this little stuff...Okay so lets proceed to my actual problem..-
Like...if u visit some server...they may have a entry textdraw...which have rules and everythin...and later that textdraws goes and dialog for login shows up...
i was trying to actually do the same thing...But how
i added the textdraws... but idk where n when to hide it...My current state is that when player joins the server...the textdraw is there and the login dialog appears too..
do i add a timer? like to show textdraw for 5 seconds and then destroy it...and then after the 5 seconds have passed it shows login dialog for player...help me lol m clueless..:/
Re: Cant Figure out (Textdraw Timer) -
CalvinC - 17.02.2015
If you want to show it for 5 seconds, and then hide it.
Start by showing it in OnPlayerConnect, then you can create a 5-sec timer that hides it, and shows the dialog.
Re: Cant Figure out (Textdraw Timer) -
Ritzy2K - 17.02.2015
explain a bit more :3... ShowTextDrawForPlayer(playerid , mytextdraw); how to add a timer in textdraw for 5 secs? and then how do i show dialog before class selection?
Re: Cant Figure out (Textdraw Timer) -
ZombieNest - 17.02.2015
I prefer you to use SetTimerEx("HideWhatever", 5200, false, "i", playerid);
like that, 5.2 seconds because the timer is kind of sometimes bugged, It does it too fast
Re: Cant Figure out (Textdraw Timer) -
Ritzy2K - 17.02.2015
whats 'i'?
Re: Cant Figure out (Textdraw Timer) -
CalvinC - 17.02.2015
https://sampwiki.blast.hk/wiki/SetTimerEx
I mean when you show the textdraw, create a timer using SetTimerEx, that hides the textdraw and shows the dialog.
Example:
pawn Код:
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, textdrawname);
SetTimerEx( ... );
}
forward TimerName(playerid)
public TimerName(playerid)
{
TextDrawHideForPlayer(playerid, textdrawname);
ShowPlayerDialog(playerid, ... );
}
Re: Cant Figure out (Textdraw Timer) -
Ritzy2K - 17.02.2015
Thanks...ill try tomorrow (going to bed)