[HELP]Can Not save the passwords..
#1

hello ,i have register/login system using dutils+dini , here is the register one :
pawn Код:
if(dialogid == 1) {
        new file[128], name[MAX_PLAYER_NAME], str[128];
        GetPlayerName(playerid, name, MAX_PLAYER_NAME);
        format(file, sizeof(file), "LATDM/users/%s.ini", name);
        if(response) {
            if(strlen(inputtext)) {
                dini_Create(file);
                dini_IntSet(file, "pw", num_hash(inputtext));
                dini_IntSet(file, "AdminLevel", PlayerInfo[playerid][AdminLevel]);
                dini_IntSet(file, "VipLevel", PlayerInfo[playerid][VipLevel]);
                dini_IntSet(file, "cash", PlayerInfo[playerid][cash]);
                dini_IntSet(file, "score", PlayerInfo[playerid][score]);
                format(str, sizeof(str), "You are registered as ~r~ %s. Your password is ~r~ %s. /changepass to change it", name, inputtext);
                SendClientMessage(playerid, -1, str);
                PlayerInfo[playerid][score] = dini_Int(file, "score");
                PlayerInfo[playerid][cash] = dini_Int(file, "cash");
                PlayerInfo[playerid][AdminLevel] = dini_Int(file, "AdminLevel");
                PlayerInfo[playerid][VipLevel] = dini_Int(file, "VipLevel");
            }
        }
        else {
            Kick(playerid);
        }
    }
whene i register , and i /q + login , it says " wrong password". here is my .ini file :
Код:
pw=0
AdminLevel=0
VipLevel=0
cash=0
score=0
i hope you help me
NB: pw= password , i typed Server in it but in the ini file we find pw=0 ....
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)