16.07.2011, 16:58
In register process example:
// here i put and works
when i put here, result
Works Good
pawn Код:
if(!response)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "This question is mandatory, come back and fill it in!");
Kick(playerid);
}
else if(strlen(inputtext) < 4 || strlen(inputtext) > 48)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "We can't accept your question. It must be longer then 4 characters, but no more then 48.");
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_INPUT, "Security Question - Step 1", "What would you like your security question to be?", "Submit", "Leave");
}
else
{
new string[128], esc_inputtext[48];
format(string, sizeof(string), "You have entered; \"%s\" as your security question. Is this correct?", inputtext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
mysql_real_escape_string(inputtext, esc_inputtext);
format(Query, sizeof(Query), "UPDATE `Accounts` SET `Security Question` = '%s' WHERE `Username` = '%s'", esc_inputtext, GetName(playerid));
mysql_query(Query);
pawn Код:
GetPlayerIp(playerid, pStats[playerid][pIPAddress], 17);
format(Query, sizeof(Query), "UPDATE `Accounts` SET `IP Address` = '%s' WHERE `Username` = '%s'", pStats[playerid][pIPAddress], GetName(playerid));
mysql_query(Query); //Queries
pawn Код:
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Security Question - Step 1 (confirmation)", "Yes, continue.\nNo, try again.", "Submit", "Leave");
}
}
when i put here, result
pawn Код:
[19:50:10] CMySQLHandler::Query(UPDATE `Accounts` SET `IP Address` = '127.0.0.1' WHERE `Username` = 'Player') - Successfully executed.