Multiple dialogs, do not save to mysql before registration is completly done?
#4

First Thing:

In
Код:
ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_MSGBOX, "Registration", "Please choose the gender of your character", "Male", "Female");
		}

		case DIALOG_GENDER:
		{
			if(!response) Kick(playerid);
			if(response)
			{
				pData[playerid][Gender] = 0;
				ShowPlayerDialog(playerid, DIALOG_ORIGIN, DIALOG_STYLE_INPUT, "Registration", "What is your character's origin? (IC)\n\tPlease type it below:", "Continue", "Leave");
			}
			else
			{
				pData[playerid][Gender] = 1;
				ShowPlayerDialog(playerid, DIALOG_ORIGIN, DIALOG_STYLE_INPUT, "Registration", "What is your character's origin? (IC)\n\tPlease type it below:", "Continue", "Leave");
			}
		}
This will create two buttons " Male " n " Female ".

So if you a user choose " Female " one, then according to your script, the server will kick him (which it shouldn't). So replace the else statement with (!response) statement in DIALOG_GENDER first.

Second thing:
Quote:

I don't want to store useless information as if someone quit in the middle of the tutorial, I want them to completely re-do it. In other words; they won't be registered.

To do this, you have to remove the MYSQL Query from the (DIALOG_REGISTER)
and run the query as a whole in DIALOG_ORIGIN only.

And also, when a player connects; set the values to null, this can be done by:

Put this under OnPlayerConnect(playerid):

pData[playerid][Password] = 0;
pData[playerid][Gender] = 0;
pData[playerid][Origin] = 0;
// also set other variables like these here

" OnDialogResponse " Thing:

Fixed script: http://pastebin.com/C7frntKu
-------------------------------------------------------------------------------------------------------------------
New Fixed script: http://pastebin.com/1EeMffkz (Found a bug on line no.70, and debugged it)
Reply


Messages In This Thread
DISREGARD - by Hargrave - 09.01.2016, 11:26
Re: Multiple dialogs, do not save to mysql before registration is completly done? - by Vince - 09.01.2016, 13:34
RE: - by Hargrave - 09.01.2016, 13:48
Re: Multiple dialogs, do not save to mysql before registration is completly done? - by Akbaig - 09.01.2016, 15:59
Re: Multiple dialogs, do not save to mysql before registration is completly done? - by Hargrave - 09.01.2016, 18:39
Re: Multiple dialogs, do not save to mysql before registration is completly done? - by Akbaig - 09.01.2016, 19:24

Forum Jump:


Users browsing this thread: 3 Guest(s)