01.08.2011, 02:28
pawn Код:
OnPlayerLogin(playerid, password[])
{
new
hashPassword[129],
uFile[35];
format(uFile, 35, USER_FILE, GetName(playerid));
INI_ParseFile(uFile, "LoadUserData", .bExtra = true, .extra = playerid);
WP_Hash(hashPassword, 129, password);
if(strcmp(PlayerInfo[playerid][pPassword], hashPassword, true))
{
SetPVarInt(playerid, "Logged", 1); //setting PVar that palyer is logged in
}
return 1;
}