09.08.2011, 03:16
Anyone see an error in the following code:
No matter what, it keeps making me register the account, and since in my DB i have an id system aswell, I have 5 "Abreezy"s register, ids 2-6. How can I fix this, so there wont be repeated accounts?
pawn Код:
public OnPlayerConnect(playerid)
{
mysql_format(Handler, szQuery, "SELECT * FROM `account` WHERE Username = '%e'", pName(playerid));
mysql_store_result();
if(mysql_num_rows() > 0) {
ShowPlayerDialog(playerid, 20, DIALOG_STYLE_INPUT, "Hype Roleplay", "Welcome Back [ :: ] Enter your password below to login ", "Login", "Quit");
} else {
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_INPUT, "Hype Roleplay", "Welcome to Hype-RP [ :: ] Enter a password to register ", "Register", "Quit");
}
mysql_free_result();
return 1;
}