What am I doing wrong?! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What am I doing wrong?! (
/showthread.php?tid=229405)
What am I doing wrong?! -
77ther - 21.02.2011
Short explanation:
I'm creating a little "video" made of several textdraws, and I would like those textdraws to switch after some seconds, but I keep failing on that,
For now I created only 1 textdraw and I would like to delay register dialog from popping up, but somehow I can't..
pawn Код:
else if (PlayerStep[playerid] == 1)
{
TextDrawShowForPlayer(playerid, Textdraw5);
TextDrawShowForPlayer(playerid, Textdraw101);
TextDrawShowForPlayer(playerid, Textdraw101);
TextDrawShowForPlayer(playerid, Textdraw102);
TextDrawShowForPlayer(playerid, Textdraw103);
TextDrawShowForPlayer(playerid, Textdraw104);
TextDrawShowForPlayer(playerid, Textdraw105);
TextDrawShowForPlayer(playerid, Textdraw106);
TextDrawShowForPlayer(playerid, Textdraw107);
PlayerStep[playerid] = SetTimerEx("PlayerStep", 25000, false, "i", playerid);
PlayerStep[playerid] = 2;
if (PlayerStep[playerid] == 2)
{
ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,"Dobrodoљao, Molimo vas da se Registrirate","Napiљite lozinku da bi se Registrirali.","Registriraj","Napusti");
}
}
Re: Wha am I doing wrong?! -
Ricop522 - 21.02.2011
put your textdraws
Re: What am I doing wrong?! -
Vince - 21.02.2011
You'll need to add a return after you've set the timer, to prevent the code from executing the if statement that's below it.
Re: Wha am I doing wrong?! -
77ther - 21.02.2011
Quote:
Originally Posted by Ricop522
put your textdraws
|
textdraws show correctly, I can't set timer to delay register dialog from popping up..
Re: What am I doing wrong?! -
77ther - 21.02.2011
I've done this and now it doesn't show at all
pawn Код:
else if (PlayerStep[playerid] == 1)
{
TextDrawShowForPlayer(playerid, Textdraw5);
TextDrawShowForPlayer(playerid, Textdraw101);
TextDrawShowForPlayer(playerid, Textdraw101);
TextDrawShowForPlayer(playerid, Textdraw102);
TextDrawShowForPlayer(playerid, Textdraw103);
TextDrawShowForPlayer(playerid, Textdraw104);
TextDrawShowForPlayer(playerid, Textdraw105);
TextDrawShowForPlayer(playerid, Textdraw106);
TextDrawShowForPlayer(playerid, Textdraw107);
PlayerStep[playerid] = SetTimerEx("PlayerStep", 5000, false, "i", playerid);
PlayerStep[playerid] = 2;
return 1;
}
else if (PlayerStep[playerid] == 2)
{
ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,"Dobrodoљao, Molimo vas da se Registrirate","Napiљite lozinku da bi se Registrirali.","Registriraj","Napusti");
}