Wrong password bugs up spawn.
#1

Hey basically if a player enters their password wrong it tells them to try again, however if they then get it right they end up in LV and bypass OnPlayerRequestClass.

Can anyone help me :S

Here is the code where they have to re-enter their password:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DIALOG_LOGIN:
        {
            if(!response)
            {
                SendClientMessage(playerid, COLOUR_RED, "Kick due to: Quitted login");
                return Kick(playerid);
            }
            if(CheckUserLogin(playerid, inputtext))
            {
                return LoginUser(playerid);
            }
            else
            {
                SendClientMessage(playerid, COLOUR_RED, "Wrong {FFFFFF}password, please try again");
                return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Type in your password to login", "Login", "Quit");
            }
        }
Reply
#2

Sorry, basically when they enter the password wrong, then enter it right (So it takes 2 attempts to log in), it doesnt put the player where they last logged out, instead they end up in LV at the top of the escalators and I dont know how to fix it. I can't see if there is anything wrong with my code when it requests them to retype their password and i cant understand why it bypasses OnPlayerRequestClass, as if it doesnt exist when they finally get the password right.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)