Setting for Player Health to 99 good idea?
#8

Now great it compile but when i try in game

pawn Код:
CMD:changepass(playerid, params[])
{
    new newpass[50], oldpass[50];
    format(oldpass, 50, "%s", pInfo[playerid][Pass]);
    new INI:file = INI_Open(PlayerPath(playerid));
    if(sscanf(params, "s[50]s[50]", oldpass, newpass)) return SendClientMessage(playerid, COLOR_GREY, "SYNTAX: /changepass [oldpass] [newpass]");
    if(strval(pInfo[playerid][Pass]) < 0) return SendClientMessage(playerid, COLOR_GREY, "Don't leave the line called 'oldpass' blank!");
    if(strval(newpass) < 0) return SendClientMessage(playerid, COLOR_GREY, "Don't leave the line called 'newpass' blank!");
    if(strcmp(oldpass, pInfo[playerid][Pass], true) != 0) return SendClientMessage(playerid, COLOR_GREY, "That is not your oldpassword!");
    INI_WriteInt(file, "Pass", udb_hash(newpass));
    INI_Close(file);
    return 1;
}
'/changepass 0913456373 iloveyou'

it says "That is not your oldpass!"

maybe this is because my saving system is hasing my password?
i use dudb to hash my password
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)