SA-MP Forums Archive
MySQL Register/Login won't load - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Register/Login won't load (/showthread.php?tid=486923)



MySQL Register/Login won't load - Lyksus - 11.01.2014

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;
    }



Re: MySQL Register/Login won't load - DarrenReeder - 11.01.2014

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


Re: MySQL Register/Login won't load - MadafakaPro - 11.01.2014

show the dialog_login and dialog_register code