Dialogs,timers etc. -
x96664 - 22.01.2013
Is it possible when I click an dialog to use timer (ex.: 10 secs) and after 10 seconds the another dialog to appear ? If its please tell me how to do it .
Re: Dialogs,timers etc. -
x96664 - 22.01.2013
i.e. if it's a menu dialog and the first menu item says 10 seconds I click it and after 10 seconds another (message dialog) appears and says 10 seconds passed.
Re: Dialogs,timers etc. -
arakuta - 22.01.2013
Yup.
pawn Код:
SetTimerEx("OpenDialog",10000,false,"ii",playerid,dialogid);
pawn Код:
forward OpenDialog(playerid,dialogid);
public OpenDialog(playerid,dialogid)
{
switch(dialogid)
{
case 1000: ShowPlayerDialog(playerid,1001,DIALOG_STYLE_MSGBOX,"Test","10 seconds have passed!","Ok","");
}
return 1;
}
Re: Dialogs,timers etc. -
x96664 - 22.01.2013
Quote:
Originally Posted by arakuta
Yup.
pawn Код:
SetTimerEx("OpenDialog",10000,false,"ii",playerid,dialogid);
pawn Код:
forward OpenDialog(playerid,dialogid);
public OpenDialog(playerid,dialogid) { switch(dialogid) { case 1000: ShowPlayerDialog(playerid,1001,DIALOG_STYLE_MSGBOX,"Test","10 seconds have passed!","Ok",""); } return 1; }
|
Ty a lot Rep+ because the fast response
Re: Dialogs,timers etc. -
x96664 - 22.01.2013
Quote:
Originally Posted by arakuta
Yup.
pawn Код:
SetTimerEx("OpenDialog",10000,false,"ii",playerid,dialogid);
|
Do I need sscanf for this part ?
Re: Dialogs,timers etc. -
SilverKiller - 22.01.2013
Quote:
Originally Posted by x96664
Do I need sscanf for this part ?
|
no you dont need
Re: Dialogs,timers etc. -
FUNExtreme - 22.01.2013
Quote:
Originally Posted by x96664
Do I need sscanf for this part ?
|
SetTimerEx is a default samp function. Look it up on the wiki if you're confused by something.
Quote:
Originally Posted by SilverKiller
Oh wait,
pawn Код:
SetTimerEx("OpenDialog",10000,false,"i",playerid,dialogid);
This should work i think.
|
The first one was correct. "ii" because you have two integer arguments
Re: Dialogs,timers etc. -
SilverKiller - 22.01.2013
Quote:
Originally Posted by FUNExtreme
The first one was correct. "ii" because you have two integer arguments
|
Yes i know i edited the post sorry.
Re: Dialogs,timers etc. -
x96664 - 22.01.2013
error 017: undefined symbol "playerid" for this line SetTimerEx("OpenDialog",10000,false,"ii",playerid, dialogid);
Re: Dialogs,timers etc. - Patrick - 22.01.2013
you could just do this
pawn Код:
SetTimer("OpenDialog",10000,1);