30.08.2011, 01:14
This is how I'm saving the password:
That's called after someone finishes with the register dialog.
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;
}