30.08.2013, 11:07
hi guys, I'm trying to change from udb_hash to whirlpool after my gamemode is converted dini+dudb to Y_INI.
How to change it to whirlpool? Here's my ondialogresponse (login)
pawn Код:
if(udb_hash(inputtext) != PlayerInfo[playerid][Password]) return ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Wrong Password!\nPlease enter correct password","Login","Disconnect");
pawn Код:
if(dialogid == DIALOG_LOGIN)
{
if(!response) Kick(playerid);
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
if(strlen(inputtext) == 0) return ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Invalid Password!\nPlease enter correct password","Login","Leave");
if (fexist(UserPath(playerid)))
{
LoadData(playerid);
if(udb_hash(inputtext) != PlayerInfo[playerid][Password]) return ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Wrong Password!\nPlease enter correct password","Login","Disconnect");
else
{
IsPlayerLogged[playerid] = 1;
// SetPlayerMoney(playerid, dini_Int(file, "Money"));
SetPlayerMoney(playerid, PlayerInfo[playerid][Money]);
// SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerScore(playerid, PlayerInfo[playerid][Score]);
// PlayerSkin[playerid] = dini_Int(file,"Skin");
PlayerSkin[playerid] = PlayerInfo[playerid][Skin];
// SetPlayerWantedLevel(playerid, dini_Int(file, "WantedLevel"));
SetPlayerWantedLevel(playerid, PlayerInfo[playerid][WantedLevel2]);
SendClientMessage(playerid, GREY, "You are now logged in. Your status will be saved on your logout.");
SendClientMessage(playerid, COLOR_GREEN, "Continuing current life...");
GameTextForPlayer(playerid, "~r~Logged In!", 3000, 1);
}
}
}
return 0;
}