Admin Level keep re writing on scriptfiles when relloging
#9

Quote:
Originally Posted by Rafael_Zambrano
Посмотреть сообщение
aja !
eureca !
theres your problem !
you must sort it nothin' more
add this in onplayer disconnect
[pawn]
pawn Код:
public OnPlayerDisconnect(playerid,reason)
{
         new INI:File = INI_Open(UserPath(playerid));
         INI_SetTag(File,"Data");
         INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
         INI_WriteInt(File,"Scores",GetPlayerScore(playerid));
         INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKill]);
         INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeath]);
         INI_WriteInt(File,"Admin Level",PlayerInfo[playerid][pAdmin]);
         INI_WriteInt(File,"VIP Level",PlayerInfo[playerid][pVip]);//must be like "onplayerdisconnect" or will save twice and different !
         INI_Close(File);
         return 1;
}
and in dialog

pawn Код:
if(dialogid == DIALOG_REGISTER)
    {
        if(response)
        {
            if(!strlen(inputtext))return ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Please Register your account here!","Type your password to make one your account!","Register","Leave");
            new INI:File = INI_Open(UserPath(playerid));
            INI_SetTag(File,"Data");
            INI_WriteInt(File,"Password",udb_hash(inputtext));
            INI_WriteInt(File,"Cash",0);
            INI_WriteInt(File,"Scores",0);
            INI_WriteInt(File,"Kills",0);
            INI_WriteInt(File,"Deaths",0);
            INI_WriteInt(File,"Admin Level",0);
            INI_WriteInt(File,"VIP Level",0);
            INI_Close(File);
            SendClientMessage(playerid,COLOR_GREEN,"[INFO]:You Have succesfully registered!");
            Logged[playerid] = 1;
        }
        if(!response)return Kick(playerid);
    }
Still re writing again :/
Ive typed exaclty the codes that you gave. But still not fixed :/
Please help me
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)