Error password when login using y_ini
#3

Note: I'm using whirlpool.

pawn Код:
forward GetPassword(playerid, name[], value[]);
public GetPassword(playerid, name[], value[])
{
  INI_String("Password", PlayerInfo[playerid][Password],129);
  return 1;
}
pawn Код:
if( response )
{
    INI_ParseFile(Path(playerid), "GetPassword", .bExtra = true, .extra = playerid);
    new hashpass[129];
    WP_Hash(hashpass,sizeof(hashpass),inputtext);
    if(!strcmp(hashpass, PlayerInfo[playerid][Password], true))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        SetSpawnInfo(playerid,-1,1,2000.6132,1560.1454,15.3672,0.7534,0,0,0,0,0,0);
        SpawnPlayer(playerid);
        SetPlayerMoneyEx(playerid, PlayerInfo[playerid][Money]);
        SetPlayerScoreEx(playerid, PlayerInfo[playerid][Score]);
        ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
        return 1;
    }
}
Use whirlpool. It's more safer than udb_hash
Reply


Messages In This Thread
Error password when login using y_ini - by Deviant96 - 15.05.2014, 18:34
Re: Error password when login using y_ini - by DaniceMcHarley - 15.05.2014, 19:02
Re: Error password when login using y_ini - by Affan - 16.05.2014, 03:46

Forum Jump:


Users browsing this thread: 3 Guest(s)