MySQL Register/Login won't load
#1

Can anyone see what's wrong? When I go in-game, nothing shows up.

pawn Код:
public OnPlayerConnect(playerid)
    {
        new string[256];
        new query[300], pname[24];
        GetPlayerName(playerid, pname, 24);
        format(query, sizeof(query), "SELECT * FROM accounts WHERE username = '%s'", pname);
        mysql_query(query);
        mysql_store_result();
        new rows = mysql_num_rows();
        if(!rows)
        {
            format(string, sizeof(string), "{FFFFFF}Welcome to Red County Roleplay {FFFF00}%s{FFFFFF}\nPlease register by entering a password below:", RemoveUnderScore(playerid));
            ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Red County Roleplay - {FFFF00}Register", string, "Register", "Quit");
        }
        if(rows == 1)
        {
            format(string, sizeof(string), "{FFFFFF}Welcome back to Red County Roleplay {3A8F32}%s{FFFFFF}.\nEnter your password below to log in:", RemoveUnderScore(playerid));
            ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Red County Roleplay - {3A8F32}Login", string, "Login", "Quit");
        }
        mysql_free_result();
        return 1;
    }
Reply
#2

I can give you a hand with this stuff... Ill pm you
Reply
#3

show the dialog_login and dialog_register code
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)