Cant Figure out (Textdraw Timer)
#1

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..:/
Reply
#2

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

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

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
Reply
#5

whats 'i'?
Reply
#6

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, ... );
}
Reply
#7

Thanks...ill try tomorrow (going to bed)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)