Mysql problem
#4

Ok thanks i'm using R6

Can anyone tell me how to fix this

pawn Код:
public OnPlayerConnect(playerid)
{
    new Query[80],string[128];
    format(Query,sizeof(Query),"SELECT `Username` FROM `Users` WHERE `Username` = `%s` LIMIT 1;",GetName(playerid));
    mysql_query(Query);
    mysql_store_result();
    if(mysql_num_rows() != 0)
    {
        format(string,sizeof(string),"Hey, %s! \nYour account is registered.\nPlease enter the password to log in!",GetName(playerid));
        ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"Login",string,"Login","Quit");
    }
    else
    {
        format(string,sizeof(string),"Hey, %s! \nYour account is not registered. \nPlease register to continue!",GetName(playerid));
        ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Register",string,"Register","Quit");
    }
    mysql_free_result();
    return 1;
}
i'm not registered but it show me the dialog login.
Reply


Messages In This Thread
Mysql problem - by xganyx - 07.09.2013, 09:58
Re: Mysql problem - by Konstantinos - 07.09.2013, 10:00
Re: Mysql problem - by Patrick - 07.09.2013, 10:07
Re: Mysql problem - by xganyx - 07.09.2013, 10:28
Re: Mysql problem - by jasonsmith - 07.09.2013, 10:42
Re: Mysql problem - by Tomer!.$ - 07.09.2013, 10:45
Re: Mysql problem - by xganyx - 07.09.2013, 10:58
Re: Mysql problem - by Konstantinos - 07.09.2013, 10:59
Re: Mysql problem - by xganyx - 07.09.2013, 11:02

Forum Jump:


Users browsing this thread: 2 Guest(s)