Password.
#2

How does this even compile without errors!?
pawn Code:
if(!strcmp(udb_hash(inputtext),PlayerInfo[playerid][pPass]))
                {
//code
                }
Use strcmp to compare 2 strings. I think this was the problem here.

Complete code:
pawn Code:
case DIALOG_LOGIN:
        {
            if (!response) return Kick (playerid);
            if(response)
            {
                if(!strcmp(udb_hash(inputtext),PlayerInfo[playerid][pPass]))
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWanted]);
                    SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Invalid Password!\n"COL_WHITE"Type Your Password Below To Login","Login","Leave");
                }
                return 1;
            }
        }
    }
    return 1;
}
EDIT: thanks for the info Konstantinos, learned something new I guess
Reply


Messages In This Thread
Password. - by TLN - 25.03.2014, 18:27
Re: Password. - by Jstylezzz - 25.03.2014, 20:03
Re: Password. - by Konstantinos - 25.03.2014, 20:06
Re: Password. - by TLN - 25.03.2014, 20:52
Re: Password. - by gtakillerIV - 25.03.2014, 21:58
Re: Password. - by TLN - 25.03.2014, 22:10
Re: Password. - by gtakillerIV - 25.03.2014, 22:14
Re: Password. - by TLN - 25.03.2014, 22:18
Re: Password. - by gtakillerIV - 25.03.2014, 22:18
Re: Password. - by TLN - 25.03.2014, 22:20

Forum Jump:


Users browsing this thread: 1 Guest(s)