login problem
#1

it's login system, it compile good but when i entered my password it enter even if it's wrong

sorry for my bad english

login dialog:
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))
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}Invalid password.");
                SSSShowDialog(playerid, 2);
                return 1;
            }
            if(sscanf(inputtext, "s[128]", inputtext))
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}You must enter a password to procceed.");
                SSSShowDialog(playerid, 2);
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_LIME, "");
                SendClientMessage(playerid, COLOR_LIME, "");
                SendClientMessage(playerid, COLOR_LIME, "");
                format(PlayerInfo[playerid][pIP], 16, "%s", dini_Get(file, "IP"));
                GetPlayerIp(playerid, IP, sizeof(IP));
                dini_Set(file, "IP", IP);
                PlayerInfo[playerid][pSex] = dini_Int(file, "Sex");
                PlayerInfo[playerid][pAge] = dini_Int(file, "Age");
                if(!PlayerInfo[playerid][pSex] || !PlayerInfo[playerid][pAge])
                {
                    SSSShowDialog(playerid, 3);
                }
                else
                {
                    LoadChar(playerid);
                    SpawnPlayer(playerid);
                }
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}You have chosen to quit the server.");
            Kick(playerid);
        }
    }
Reply


Messages In This Thread
login problem - by AhmedMohamed - 07.04.2014, 22:29
Re: login problem - by AhmedMohamed - 07.04.2014, 22:43
Re: login problem - by lulo356 - 07.04.2014, 22:46
Re: login problem - by AhmedMohamed - 07.04.2014, 22:56
Re: login problem - by AhmedMohamed - 08.04.2014, 11:14
Re: login problem - by ChandraLouis - 08.04.2014, 11:34
Re: login problem - by DerickClark - 08.04.2014, 11:49
Re: login problem - by iBanner - 08.04.2014, 11:53

Forum Jump:


Users browsing this thread: 1 Guest(s)