SII writing problem...
#1

Hello, I'm making an admin system for my server, however I have a little problem with saving the player stats when they disconnect

so here's the code:

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{

    if (PInfo[playerid][Logged] == 1)
    {
        new file[64],PlayerName[24];
        GetPlayerName(playerid,PlayerName,sizeof PlayerName);
        format(file,sizeof file,"Admin/%s.ini",PlayerName);
        PInfo[playerid][Score] = GetPlayerScore(playerid);
        PInfo[playerid][Money] = GetPlayerMoney(playerid);
        PInfo[playerid][Skin] = GetPlayerSkin(playerid);
   
        INI_Open(file);
        INI_WriteInt("Money",PInfo[playerid][Money]);
        INI_WriteInt("Score",PInfo[playerid][Money]);
        INI_WriteInt("Skin",PInfo[playerid][Skin]);
        INI_Save();
        INI_Close();
        PInfo[playerid][Logged] = 0;
    }

    return 1;
}
For some reason it won't save the stats into the requested file :/

any help?
Thanks in advance
Reply


Messages In This Thread
SII writing problem... - by knackworst - 31.08.2013, 13:44
Re: SII writing problem... - by DanishHaq - 31.08.2013, 13:47
Re: SII writing problem... - by knackworst - 31.08.2013, 13:48
Re: SII writing problem... - by DanishHaq - 31.08.2013, 14:39
Re: SII writing problem... - by knackworst - 31.08.2013, 14:42
Re: SII writing problem... - by DanishHaq - 31.08.2013, 14:48
Re: SII writing problem... - by knackworst - 31.08.2013, 14:50
Re: SII writing problem... - by DanishHaq - 31.08.2013, 14:50
Re: SII writing problem... - by knackworst - 31.08.2013, 14:56
Re: SII writing problem... - by Emmet_ - 31.08.2013, 15:01

Forum Jump:


Users browsing this thread: 1 Guest(s)