Admin Level keep re writing on scriptfiles when relloging
#1

Hey guys, ive little problem here with my saving system. That is saving system. It is keep re writing when im logged in. Example like this:

pawn Код:
Cash = 0
Scores = 0
Password = 248251233
Kills = 0
Deaths = 0
Admin Level = 3
VIP Level = 0
It was like this. Then i want test by relogging. Then it is re writen become like this:
pawn Код:
Cash = 0
Scores = 0
Password = 248251233
Kills = 0
Deaths = 0
Admin Level = 3
VIP Level = 0
Admin Level = 0
VIP Level = 0
Below is my code:
pawn Код:
if(dialogid == DIALOG_LOGIN)
    {
        if(response)
        {
            if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
            {
                INI_ParseFile(UserPath(playerid),"LoadUser_data", .bExtra = true, .extra = playerid);
                GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                SetPlayerScore(playerid, PlayerInfo[playerid][pScores]);
                SendClientMessage(playerid,COLOR_GREEN,"[INFO]:You have logged in!");
                Logged[playerid] = 1;
            }
            else
            {
                ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Please Login!","Type your password below to login","Login","Leave");
            }
        }
        if(!response) return Kick(playerid);
    }
Can you help me guys? Is there something wrong there

Thanks
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)