08.10.2011, 19:26
Well, I have this login/register script, and it tells me I have the wrong password when I attempt to login with the password I registered with! I would really appreciate some help!
pawn Код:
}
if(dialogid == 2) {
new file[128], name[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(str, sizeof(str), "Users/%s.ini", name);
if(response) {
if(strlen(inputtext)) {
if(num_hash(inputtext) != dini_Int(file, "Password")) {
SendClientMessage(playerid, red, "Wrong Password");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Please Login", "Enter Your Password Below", "Login", "Cancel");
}
else {
SendClientMessage(playerid, lightgreen, "Succesfuly logged in");
PlayerInfo[playerid][PlayerLevel] = dini_Int(file, "PlayerLevel");
PlayerLogged[playerid] = 1;
PlayerInfo[playerid][PlayerCash] = dini_Int(file, "PlayerCash");
GivePlayerMoney(playerid, dini_Int(file, "PlayerCash"));
PlayerInfo[playerid][AdminLevel] = dini_Int(file, "AdminLevel");
}
}
}
else {
Kick(playerid);
}
}
return 1;
}