[MYSQ] Script not detecting username.
#1

Note: I'm really new with MYSQL so please give full explanations.

So i've been trying to get my script to understand that the field "NAME" with the username %s, GetName(playerid) will allow them to login, but it keeps sending them to register dialog.

Account Checking
pawn Код:
forward OnAccountCheck(playerid);
public OnAccountCheck(playerid)
{
    new rows, fields;
    cache_get_data(rows, fields, DB);
    if(rows)
    {
        cache_get_field_content(0, "Name", GetName(playerid), DB, 129);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "In order to play, you need to login", "Login", "Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register", "In order to play, you need to register.", "Register", "Quit");
    }
    return 1;
}
Reply


Messages In This Thread
[MYSQ] Script not detecting username. - by Cole_William - 22.07.2014, 21:00
Re: [MYSQ] Script not detecting username. - by Vince - 22.07.2014, 21:26
Re: [MYSQ] Script not detecting username. - by Cole_William - 22.07.2014, 21:40

Forum Jump:


Users browsing this thread: 3 Guest(s)