09.01.2016, 15:59
(
Последний раз редактировалось Akbaig; 09.01.2016 в 19:39.
)
First Thing:
In
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:
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)
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"); } }
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. |
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)