Dialog popping up - 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: Dialog popping up (
/showthread.php?tid=229833)
Dialog popping up -
77ther - 22.02.2011
Well there is a dialog(originaly made by cuervo in raven's RP) where you have to accept terms to join the server, EVERY time you connect..and after that Login or Register dialog pops up.. And I can't find a way to remove it entirely from the script...
you can find that dialog by searching for "Prihvaćam"..
Also I created function ShowVideo which should be few textdraws before login thing, but previously mentioned dialog bugs it..
http://pastebin.com/pHzhTG8s
AW: Dialog popping up -
Nero_3D - 22.02.2011
Just remove the ShowPlayerDialog line and put your ShowVideo there ?
Re: AW: Dialog popping up -
77ther - 22.02.2011
Quote:
Originally Posted by Nero_3D
Just remove the ShowPlayerDialog line and put your ShowVideo there ?
|
but when I remove that dialog, notthing appears because it needs authentication that you accepted those terms
EDIT: I edited it a bit, and somehow it worked, but now my textdraws don't show up..
I also got a problem with timer, it doesn't delay that dialog from popping up
Re: Dialog popping up -
maramizo - 22.02.2011
There's probably a public called, try calling that public.
Re: Dialog popping up -
77ther - 22.02.2011
Quote:
Originally Posted by maramizo
There's probably a public called, try calling that public.
|
Can you write example code?
Re: Dialog popping up -
maramizo - 22.02.2011
Should be somewhat like this :
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(!response) return SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!"); Kick(playerid);
if (response == 1)
{
SendClientMessage(playerid, 0xFFFFFFFF, "You agreed to the terms");
PublicCallBackHere(playerid); // Should be something like this
return 1;
}
return 0;
}
Re: Dialog popping up -
77ther - 22.02.2011
Quote:
Originally Posted by maramizo
Should be somewhat like this :
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1) { if(!response) return SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!"); Kick(playerid); if (response == 1) { SendClientMessage(playerid, 0xFFFFFFFF, "You agreed to the terms"); PublicCallBackHere(playerid); // Should be something like this return 1; } return 0; }
|
Finaly I managed to bypass the s***...
and can you tell me why doesn't my timer delay function?
pawn Код:
public ShowVideo(playerid)
{
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] = 2;
ShowVideo(playerid);
SetTimerEx("PlayerStep", 10000, false, "i", playerid);
return true;
}
else if(PlayerStep[playerid] == 2)
{
ShowPlayerDialog(playerid, 1246, DIALOG_STYLE_INPUT,"Dobrodoљao, Molimo te da se Registriraљ","Napiљi lozinku da bi se Registrirao.","Registriraj","Napusti");
}
return 1;
}
timer suppose to delay PlayerStep 2 from initiating.. but it keeps failing