wrong pass
#1

Hello, i just finished my registration system with the help of some members around here, but got a problem.

Everything works except for the login, it says everytime "Wrong password" even if i put the CORRECT password:

pawn Код:
CMD:login(playerid, params[])
{
            new filestring[128];
            new name[24];
            GetPlayerName(playerid, name, 24);
            format(filestring, sizeof(filestring), "/Users/%s.ini", name);
            if(!fexist(filestring)) return SCM(playerid, COLOR_YELLOW, "You are not registered. Please /register.");
            new lpass[64];
            if(PlayerInfo[playerid][pLogged] == 1) return SCM(playerid, COLOR_YELLOW, "You are already logged in.");
            if(sscanf(params, "s[64]", lpass)) return SCM(playerid, -1, "{F70505}Usage: {FFFFFF}/login [password]");
            if(udb_hash(lpass) == PlayerInfo[playerid][pPass])
            {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    SetPlayerCash(playerid, PlayerInfo[playerid][pCash]);
                    SetPlayerScore(playerid, PlayerInfo[playerid][pKills]);
                    SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pRank]);
                    PlayerInfo[playerid][pLogged] += 1;
                    SCM(playerid,0x0080C0FF,"System: Account data loaded! Welcome back!");
            }
            else
            {
            SCM(playerid,0x0080C0FF,"System: Wrong password!");
            }
            return 1;
}
Reply


Messages In This Thread
wrong pass - by Face9000 - 14.12.2012, 21:52
Re: wrong pass - by tyler12 - 14.12.2012, 21:54
Re: wrong pass - by HireMe - 14.12.2012, 21:57
Re: wrong pass - by Djole1337 - 14.12.2012, 22:01
Re: wrong pass - by Face9000 - 14.12.2012, 22:08
Re: wrong pass - by tyler12 - 14.12.2012, 22:10
Re: wrong pass - by Face9000 - 14.12.2012, 22:18
Re: wrong pass - by Gh05t_ - 14.12.2012, 22:26
Re: wrong pass - by Face9000 - 14.12.2012, 22:30
Re: wrong pass - by Gh05t_ - 14.12.2012, 22:42

Forum Jump:


Users browsing this thread: 1 Guest(s)