password problem :/
#1

i can enter any password and it will work
any fix?
pawn Код:
else if(dialogid == 2) // Login
    {
        if(response)
        {
            new file[64], password[256], IP[16], password2[256];
            format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
            WP_Hash(password2, sizeof(password2), inputtext);
            format(password, sizeof(password), "%s", dini_Get(file, "Password"));
            if(strcmp(password, inputtext,true) && strcmp(password, password2, true))
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}Invalid password.");
                ShowDialog(playerid, 2);
                return 1;
            }
            if(strlen(inputtext) < 4)
            {
             SendClientMessage(playerid, COLOR_GREY, "Password can't be shorter than 6 characters.");
             ShowDialog(playerid, 2);
             return 1;
            }
            if(strlen(inputtext) > 256)
            {
                SendClientMessage(playerid, COLOR_GREY, "Password can't be longer than 256 characters.");
                ShowDialog(playerid, 2);
                return 1;
            }
            else if(sscanf(inputtext, "s[128]", inputtext))
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}You must enter a password to procceed.");
                ShowDialog(playerid, 2);
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "");
                SendClientMessage(playerid, COLOR_WHITE, "");
                SendClientMessage(playerid, COLOR_WHITE, "");
                SendClientMessage(playerid, COLOR_WHITE, "");
                SendClientMessage(playerid, COLOR_WHITE, "");
                SendClientMessage(playerid, COLOR_WHITE, "");
                SendClientMessage(playerid, COLOR_WHITE, "");
                SendClientMessage(playerid, COLOR_WHITE, "");
                SendClientMessage(playerid, COLOR_WHITE, "");
                SendClientMessage(playerid, COLOR_WHITE, "");
                SendClientMessage(playerid, COLOR_WHITE, "");
                format(PlayerInfo[playerid][pIP], 16, "%s", dini_Get(file, "IP"));
                GetPlayerIp(playerid, IP, sizeof(IP));
                dini_Set(file, "IP", IP);
                PlayerInfo[playerid][pGender] = dini_Int(file, "Gender");
                PlayerInfo[playerid][pAge] = dini_Int(file, "Age");
                if(!PlayerInfo[playerid][pGender] || !PlayerInfo[playerid][pAge])
                {
                    ShowDialog(playerid, 3);
                }
                else
                {
                    LoadChar(playerid);
                    SpawnPlayer(playerid);
                }
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}You have chosen to quit the server.");
            FixedKick(playerid);
        }
    }
Reply


Messages In This Thread
password problem :/ - by Rabea - 26.01.2015, 17:15
Re: password problem :/ - by DRIFT_HUNTER - 26.01.2015, 17:24
Re: password problem :/ - by Rabea - 26.01.2015, 17:29
Re: password problem :/ - by DRIFT_HUNTER - 26.01.2015, 17:35
Re: password problem :/ - by Rabea - 26.01.2015, 17:38
Re: password problem :/ - by DRIFT_HUNTER - 26.01.2015, 17:45
Re: password problem :/ - by Rabea - 26.01.2015, 17:50

Forum Jump:


Users browsing this thread: 1 Guest(s)