27.07.2012, 09:59
(
Последний раз редактировалось SEnergy; 27.07.2012 в 14:28.
)
edit: well login/register is working so far, but I have this error: I can enter ANY password to login, any suggestions?
PHP код:
if(dialogid == iLoginDialog)
{
if(response)
{
if(strlen(inputtext) > 0)
{
new EscapedText[60];
mysql_real_escape_string(inputtext, EscapedText);
new len = strlen(EscapedText);
format(Query, sizeof(Query), "SELECT `Password` FROM `RL` WHERE `Username` = '%s';", pName);
mysql_query(Query);
new result[60];
mysql_fetch_field_row(result, "Password");
if(strcmp(EscapedText, result, true, len) == 0)
{
TogglePlayerSpectating(playerid, false);
return 1;
}
}
ShowPlayerDialog(playerid, iLoginDialog, DIALOG_STYLE_PASSWORD, "Login", "Enter Your Password!", "Login", "Cancel");
}
else
return 0;
}