SA-MP Forums Archive
[SOLVED] Dialog?!? - 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: [SOLVED] Dialog?!? (/showthread.php?tid=116800)



[SOLVED] Dialog?!? - Mechscape - 30.12.2009

How do i make, to close dialog, if clicking "Cancel"

if(!response)...

Theres no OnPlayerDialogClose.. bla bla..


Re: Dialog?!? - [03]Garsino - 30.12.2009

Quote:
Originally Posted by Tulejumal
How do i make, to close dialog, if clicking "Cancel"

if(!response)...

Theres no OnPlayerDialogClose.. bla bla..
It should do that automatic? It does that for me :#


Re: Dialog?!? - Mechscape - 30.12.2009

Then says me "You didnt typed password!"


Re: Dialog?!? - WackoX - 30.12.2009

Quote:
Originally Posted by Tulejumal
Then says me "You didnt typed password!"
Then you need to remove the ''if(!response)'' line.


Re: Dialog?!? - Mechscape - 30.12.2009

I did removed now, and connected. I clicked "Cancel", says again "You didn't typed a password!" and cant quit. I did used taskmanager, to close this SA.


Re: Dialog?!? - MadeMan - 30.12.2009

Can you show your OnDialogResponse callback?


Re: Dialog?!? - Mechscape - 30.12.2009

Код:
if(dialogid == 1)
  {
	  for(new s; s < strlen(inputtext); s++)
		{
			if (inputtext == '%')
			{
				inputtext = ' ';
			}
		}
    //if(!response) Kick(playerid);// RESPONE - EXIT
    // STRLEN - BOX
  	if(!strlen(inputtext))
		{
			new Dialog1[256];
		  new pName[MAX_PLAYER_NAME];
  			GetPlayerName(playerid, pName, sizeof(pName));
			format(Dialog1,256,"Sa ei trьkkinud parooli!\nKasutaja: %s\nTrьki siia uuesti parooli:",pName);
			ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Logimine",Dialog1,"Logi sisse","Vдlju");
			return 1;
		}
		OnPlayerLogin(playerid,inputtext); // Saadab parooli, et logida kasutajat.
    return 1;
  }
  if(dialogid == 2)
  {
    for(new s; s < strlen(inputtext); s++)
		{
			if (inputtext == '%')
			{
				inputtext = ' ';
			}
		}
    //if(!response) Kick(playerid);// RESPONE - EXIT
  	if(!strlen(inputtext))
		{
		  new Diaglog2[256];
		  new pName[MAX_PLAYER_NAME];
  			GetPlayerName(playerid, pName, sizeof(pName));
			format(Diaglog2,256,"Sa ei trьkkinud parooli!\nKasutaja: %s\nTrьki siia uuesti parooli:",pName);
			ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Logimine",Diaglog2,"Registreeri","Vдlju");
			return 1;
		}
		OnPlayerRegister(playerid,inputtext); // Saadab parooli, et registeerida kasutajat.
    return 1;
  }
Dialog ID = 1 (Login system)
Dialog ID = 2 (Register system)


Re: Dialog?!? - MadeMan - 30.12.2009

This is the part that makes it so:

pawn Код:
if(!strlen(inputtext))
        {
            new Dialog1[256];
          new pName[MAX_PLAYER_NAME];
            GetPlayerName(playerid, pName, sizeof(pName));
            format(Dialog1,256,"Sa ei trьkkinud parooli!\nKasutaja: %s\nTrьki siia uuesti parooli:",pName);
            ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Logimine",Dialog1,"Logi sisse","Vдlju");
            return 1;
        }



Re: Dialog?!? - Mechscape - 30.12.2009

Yes?


Re: Dialog?!? - MadeMan - 30.12.2009

Quote:
Originally Posted by Tulejumal
Yes?
I guess you wanted to do something with that?