MySQL logging-in problem
#1

Hey, i have problem with logging-in using MyBB database
When i insert password dialog is dissapearing and nothing happening

there's code

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case D_INFO:
        {
            return 1;
        }
        case D_LOGIN_GLOBAL:
        {
            if(response)
            {
                new str[256];

                mysql_real_escape_string(inputtext, inputtext);
                format(str, sizeof(str), "SELECT c.player_uid FROM `mybb_users` m, `fc_characters` c WHERE m.`password` = MD5(CONCAT(MD5(m.salt),'', MD5('%s'))) AND m.`uid` = c.`global_uid` AND c.`username` = '%s' LIMIT 1", inputtext, PlayerName(playerid));
                mysql_check(); mysql_query(str);
                mysql_store_result();

                if(mysql_num_rows())
                {
                    OnPlayerLogin(playerid, mysql_fetch_int());
                    
                    mysql_free_result();
                }
                else
                {
                    new string[256];
                    format(string, sizeof(string), "{FFFFFF}blablabla {88CC54}"DEF_NAME"{FFFFFF}.\n{FFFFFF}blablabla.");
    				format(string, sizeof(string), "%s\n\n{FFFFFF}blablabla.", string);

                    ShowPlayerDialog(playerid, D_LOGIN_GLOBAL, DIALOG_STYLE_PASSWORD, " Logging-in dialog", string, "Log-in", "Cancel");
                    
                    mysql_free_result();
                }
            }
            else
            {
                KickWithWait(playerid);
                return 1;
            }
        }
Reply
#2

Hi,

Do you have a file log with errors? Else, sends here

Nlx.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)