Ok sorry...
pawn Code:
case DIALOG_REGISTER_EMAIL:
{
if (!response)
{
Kick(playerid);
return 1;
}
else
{
if (strlen(inputtext) <= 5) return ShowPlayerDialog(playerid, DIALOG_REGISTER_EMAIL, DIALOG_STYLE_INPUT, "Registrazione... [Step: 4/6]", "{FF0000}[ERRORE:]Devi inserire una mail valida\n{AFAFAF}Servirа per proteggere il tuo acount e cambiare domanda e/o risposta di sicurezza:", "Continua", "Annulla");
// Player[playerid][PlayerEmail] = strlen(inputtext);
format(Player[playerid][PlayerEmail], 128, inputtext);
new query[221];
mysql_format(g_SQL, query, sizeof query, "INSERT INTO `players` (`username`, `password`, `salt`, `age`, `sex`, `email`) VALUES ('%e', '%s', '%e', '%d', '%d', '%s')", Player[playerid][Name], Player[playerid][Password], Player[playerid][Salt], Player[playerid][Age], Player[playerid][Sex], Player[playerid][PlayerEmail]);
// mysql_tquery(g_SQL, query, "OnPlayerRegister", "d", playerid);
new list[2 + (sizeof(SECURITY_QUESTIONS) * MAX_SECURITY_QUESTION_SIZE)];
for (new i; i < sizeof(SECURITY_QUESTIONS); i++)
{
strcat(list, SECURITY_QUESTIONS[i]);
strcat(list, "\n");
}
ShowPlayerDialog(playerid, DIALOG_REGISTER_DOMANDASEC, DIALOG_STYLE_LIST, "Registrazione - Domanda di sicurezza", list, "Continua", "Annulla");
}
}
case DIALOG_REGISTER_DOMANDASEC:
{
if (!response)
{
Kick(playerid);
return 1;
}
else
{
format(Player[playerid][e_USER_SECURITY_QUESTION], MAX_SECURITY_QUESTION_SIZE, SECURITY_QUESTIONS[listitem]);
// format(Player[playerid][e_USER_SECURITY_QUESTION], 256, SECURITY_QUESTIONS[listitem]);
// new query[221];
// mysql_format(g_SQL, query, sizeof query, "INSERT INTO `players` (`username`, `password`, `salt`, `age`, `sex`, `email`, `domandasec`) VALUES ('%e', '%s', '%e', '%d', '%d', '%s', '%e')", Player[playerid][Name], Player[playerid][Password], Player[playerid][Salt], Player[playerid][Age], Player[playerid][Sex], Player[playerid][PlayerEmail], SECURITY_QUESTIONS[listitem]);
new string[128];
format(string, sizeof(string), "{AFAFAF}Hai selezionato come domanda di sicurezza:\n%s\n{FFFFFF}Inserisci una risposta di sicurezza", Player[playerid][e_USER_SECURITY_QUESTION]);
ShowPlayerDialog(playerid, DIALOG_REGISTER_RISPOSTASEC, DIALOG_STYLE_INPUT, "Registrazione - Domanda di sicurezza [6/6]", string, "Continua", "Annuila");
// mysql_tquery(g_SQL, query, "OnPlayerRegister", "d", playerid);
}
}
case DIALOG_REGISTER_RISPOSTASEC:
{
if (!response)
{
Kick(playerid);
return 1;
}
else
{
format(Player[playerid][e_USER_SECURITY_ANSWER], 128, inputtext);
new query[221];
mysql_format(g_SQL, query, sizeof query, "INSERT INTO `players` (`username`, `password`, `salt`, `age`, `sex`, `email`, `domandasec`, `rispostasec`) VALUES ('%e', '%s', '%e', '%d', '%d', '%s', '%e', '%s')", Player[playerid][Name], Player[playerid][Password], Player[playerid][Salt], Player[playerid][Age], Player[playerid][Sex], Player[playerid][PlayerEmail], Player[playerid][e_USER_SECURITY_QUESTION], strlen(inputtext));
mysql_tquery(g_SQL, query, "OnPlayerRegister", "d", playerid);
}
}
but after the "DIALOG_REGISTER_RISPOSTASEC" dialog, the script is blocked, didn't send the player in the "OnPlayerRegister" query and didn't save datas in the database