Any password or no password accepted.
#1

pawn Код:
if(dialogid == LOGIN_DIALOG)
    {
        if(!response)
        {
            ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_PASSWORD, "Login", "Type in your password", "Login", "Cancel");
        }
        else
        {
            new escapedPassword[129];
            WP_Hash(escapedPassword, sizeof(escapedPassword), inputtext);
            if(!strcmp(escapedPassword,PlayerInfo[playerid][pPass],true))
            {
                SendClientMessage(playerid, -1, "Incorrect Password Entered - Please try again.");
                ShowPlayerDialog(playerid, LOGIN_DIALOG, DIALOG_STYLE_PASSWORD, "Login", "Type in your password", "Login", "Cancel");
            }
            else
            {
                format(GlobalString, sizeof(GlobalString), "Welcome "COL_LIGHTBLUE"%s!",GetName(playerid));
                SendClientMessage(playerid, -1, GlobalString);

                SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ], PlayerInfo[playerid][pAngle], 0, 0, 0, 0, 0, 0);
                SpawnPlayer(playerid);

                TogglePlayerSpectating(playerid, false);
            }
My problem is this part:
pawn Код:
new escapedPassword[129];
            WP_Hash(escapedPassword, sizeof(escapedPassword), inputtext);
            if(!strcmp(escapedPassword,PlayerInfo[playerid][pPass],true))
Any password or no password allows you into the account.
Reply


Messages In This Thread
Any password or no password accepted. - by Stuffs - 31.05.2014, 17:38
Re: Any password or no password accepted. - by Aerotactics - 31.05.2014, 17:40
Re: Any password or no password accepted. - by Stuffs - 31.05.2014, 17:43
Re: Any password or no password accepted. - by Koala818 - 31.05.2014, 17:44
Re: Any password or no password accepted. - by Stuffs - 31.05.2014, 17:48
Re: Any password or no password accepted. - by Aerotactics - 31.05.2014, 17:48
Re: Any password or no password accepted. - by Stuffs - 31.05.2014, 17:52
Re: Any password or no password accepted. - by Calgon - 31.05.2014, 17:55
Re: Any password or no password accepted. - by Stuffs - 31.05.2014, 18:00
Re: Any password or no password accepted. - by Calgon - 31.05.2014, 18:02

Forum Jump:


Users browsing this thread: 4 Guest(s)