Logging in problem
#1

I've started to create a RP gamemode and need some help with my register/login script. I managed to get it working without any pawno errors but when I load the game up, it tells me that I have the wrong password. (Even if the password is correct.)

Here is the login command:

pawn Код:
CMD:login(playerid, params[])
{
    if(fexist(UserPath(playerid)))
        {
            if(gPlayerLogged[playerid] == 0){
            ShowPlayerDialog(playerid, 667, DIALOG_STYLE_INPUT, "Login", "Type your password here.", "Submit", "Cancel");
        }
        else
            {
                SCM(playerid, COLOR_RED, "You are already logged in.");
            }
            return 1;}
        else
            {
            SCM(playerid, COLOR_RED, "Account not found. Please use /register.");
            }
    return 1;
}
and here is the 667 dialog box:

pawn Код:
if(dialogid == 667)
    {
        if(response)
        {
            if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
            {
                INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                gPlayerLogged[playerid] = 1;
                GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                SCM(playerid, COLOR_RED, "You have logged in. You may now spawn.");
            }
           
    else
            {
               
                gPlayer[playerid] += 1;
                if(gPlayer[playerid] == 1)
                {
                SCM(playerid, COLOR_RED, "Wrong Password. 1/3");
               
                }
               
                if(gPlayer[playerid] == 2)
                {
                SCM(playerid, COLOR_RED, "Wrong Password. 2/3");

                }

                if(gPlayer[playerid] == 3)
                {
                SCM(playerid, COLOR_RED, "Wrong Password. 3/3. You have been kicked.");
                    Kick(playerid);
                }
               

            }
        }
       
    }

     return 1;
}
It's most likely a simple mixup error..
Reply


Messages In This Thread
Logging in problem - by Vrondakis - 17.03.2012, 14:38
Re: Logging in problem - by ReneG - 17.03.2012, 14:42
Re: Logging in problem - by RoleplayEditor - 17.03.2012, 14:43
Re: Logging in problem - by ReneG - 17.03.2012, 14:45
Re: Logging in problem - by Vrondakis - 17.03.2012, 14:49
Re: Logging in problem - by ReneG - 17.03.2012, 14:56
Re: Logging in problem - by Vrondakis - 17.03.2012, 14:59
Re: Logging in problem - by ReneG - 17.03.2012, 15:03
Re: Logging in problem - by Vrondakis - 17.03.2012, 18:57

Forum Jump:


Users browsing this thread: 7 Guest(s)