OnDialogResponse Login issue
#1

When you login the password says it's incorrect (it is correct), but it lets me log in at the same time, even returning the login message. The incorrect password dialog shows up as well. Anyone see the issue?


pawn Код:
case DIALOG_LOGIN:
            {
                if(response)
                {
                    new query[256];
                    format(query, sizeof(query), "SELECT `user` FROM accounts WHERE Name = '%s' AND Password = '%s'", pName(playerid), inputtext);
                   
                    mysql_query(query);
                    mysql_store_result();
                   
                    if(mysql_num_rows() == 1)
                    {
                        SendClientMessage(playerid, WHITE, "You have successfully logged into the server. Enjoy your stay.");
                        LoginScript(playerid);
                        SetTimerEx("HideLoginAndRegisterTextdraws", 200, false, "i", playerid);
                    }
                    else
                    {
                        SetPlayerPos(playerid, 774.7465,352.7754,19.7365);
                        SetPlayerCameraLookAt(playerid, 774.7465,352.7754,19.7365);
                        SetPlayerCameraPos(playerid, 811.6769,381.2172,21.4083);
                        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Emil's Gamemode", "Incorrect password!\nPlease login with a valid password below.", "Login", "Exit");
                    }
                    LoginScript(playerid);
                }
                else Kick(playerid);
                return 1;
            }
Reply
#2

Bumb
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)