Mysql OnPlayerDisconnect
#5

Anyone see an error in the following code:
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;
}
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?
Reply


Messages In This Thread
Mysql OnPlayerDisconnect - by Abreezy - 09.08.2011, 02:38
Re: Mysql OnPlayerDisconnect - by Donya - 09.08.2011, 02:40
Re: Mysql OnPlayerDisconnect - by PrawkC - 09.08.2011, 03:01
Re: Mysql OnPlayerDisconnect - by Abreezy - 09.08.2011, 03:04
Re: Mysql OnPlayerDisconnect - by Abreezy - 09.08.2011, 03:16
Re: Mysql OnPlayerDisconnect - by Snipa - 09.08.2011, 03:23
Re: Mysql OnPlayerDisconnect - by [NoV]LaZ - 09.08.2011, 03:28
Re: Mysql OnPlayerDisconnect - by Abreezy - 09.08.2011, 03:31
Re: Mysql OnPlayerDisconnect - by [NoV]LaZ - 09.08.2011, 03:35
Re: Mysql OnPlayerDisconnect - by [L3th4l] - 09.08.2011, 03:37
Re: Mysql OnPlayerDisconnect - by Grim_ - 09.08.2011, 04:36

Forum Jump:


Users browsing this thread: 6 Guest(s)