[SOLVED] Dialog?!?
#1

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

if(!response)...

Theres no OnPlayerDialogClose.. bla bla..
Reply
#2

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

Then says me "You didnt typed password!"
Reply
#4

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

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

Can you show your OnDialogResponse callback?
Reply
#7

Код:
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)
Reply
#8

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;
        }
Reply
#9

Yes?
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)