21.09.2013, 19:59
pawn Код:
query = "SELECT `user` FROM playerdata WHERE user = '%s' AND password = SHA1('%s')";
new ffp[24];
mysql_real_escape_string(inputtext,ffp);
format(query,sizeof(query),query,pname,ffp);
mysql_query(query);
mysql_store_result();
new nrows = mysql_num_rows();
if(nrows == 1) LoginAccount(playerid);
if(nrows == 0)
{
ErrorMessage(playerid,"Error: Incorrect password (1)!");
ShowPlayerDialog(playerid,DIALOG_LOGIN,3,"Login to Account (Incorrect Password)","{FFFFFF}Please login to your {00FF00}Project Heist 92{FFFFFF} account with your password.","Login","");
}
mysql_free_result();