Help with password checking.
#5

This is how I'm saving the password:
pawn Код:
OnPlayerRegister(playerid, password[])
{
    new
        hashPassword[129],
        uFile[35];

    format(uFile, 35, "%s.ini", PlayerName(playerid));

    new
        INI:playerFile = INI_Open(uFile);

    WP_Hash(hashPassword, 129, password);

    INI_WriteString(playerFile, "Password", hashPassword);
    INI_WriteInt(playerFile, "Admin", 0);
    INI_WriteInt(playerFile, "VIP", 0);
    INI_WriteInt(playerFile, "Money", 500);
    INI_WriteInt(playerFile, "Score", 0);
    INI_WriteInt(playerFile, "Kills", 0);
    INI_WriteInt(playerFile, "Deaths", 0);
    INI_WriteInt(playerFile, "Online", 0);
    INI_WriteInt(playerFile, "Banned", 0);
    INI_WriteString(playerFile, "BanReason", PlayerInfo[playerid][pBanReason]);

    INI_Close(playerFile);

    SetPVarInt(playerid, "Registered", 1);
    SetPVarInt(playerid, "Logged", 1);
    return 1;
}
That's called after someone finishes with the register dialog.
Reply


Messages In This Thread
Help with password checking. - by Jack_Leslie - 30.08.2011, 00:53
Re: Help with password checking. - by IceCube! - 30.08.2011, 01:04
Re: Help with password checking. - by Jack_Leslie - 30.08.2011, 01:08
Re: Help with password checking. - by IceCube! - 30.08.2011, 01:11
Re: Help with password checking. - by Jack_Leslie - 30.08.2011, 01:14
Re: Help with password checking. - by IceCube! - 30.08.2011, 01:27
Re: Help with password checking. - by Jack_Leslie - 30.08.2011, 01:36
Re: Help with password checking. - by IceCube! - 30.08.2011, 01:43
Re: Help with password checking. - by Jack_Leslie - 30.08.2011, 01:45
Re: Help with password checking. - by IceCube! - 30.08.2011, 01:48

Forum Jump:


Users browsing this thread: 2 Guest(s)