[Help]Y_ini Don't save on GMX
#1

So... I have a problem with Y_ini saving.It doesn't save when I do GMX.
It saves just some files. But always it reset skin and money on gmx.

I have made the gmx command like this.

Код:
CMD:gmx(playerid, params[])
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i)) // Change to your systems
        {
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");

   	PlayerInfo[i][pSkin] = GetPlayerSkin(i);
    PlayerInfo[i][pCash] = GetPlayerCash(i);

	INI_WriteInt(File,"Level",PlayerInfo[i][pLevel]);
	INI_WriteInt(File,"Int",PlayerInfo[i][pInt]);
	INI_WriteInt(File,"Respekti",PlayerInfo[i][pRespect]);
    INI_WriteInt(File,"Cash",GetPlayerCash(i));
    INI_WriteInt(File,"Admin",PlayerInfo[i][pAdmin]);
    INI_WriteInt(File,"Sex",PlayerInfo[i][pSex]);
    INI_WriteInt(File,"Age",PlayerInfo[i][pAge]);
    INI_WriteFloat(File,"Pos_x",PlayerInfo[i][pPos_x]);
    INI_WriteFloat(File,"Pos_y",PlayerInfo[i][pPos_y]);
    INI_WriteFloat(File,"Pos_z",PlayerInfo[i][pPos_z]);
    INI_WriteInt(File,"Skin",PlayerInfo[i][pSkin]);
    INI_WriteInt(File,"Team",PlayerInfo[i][pTeam]);
    INI_WriteInt(File,"Accent",PlayerInfo[i][pAccent]);
    INI_WriteInt(File,"Banned",PlayerInfo[i][pBanned]);
    INI_WriteInt(File,"Leader",PlayerInfo[i][pLeader]);
    INI_WriteInt(File,"Member",PlayerInfo[i][pMember]);
    INI_WriteInt(File,"Rank",PlayerInfo[i][pRank]);
    INI_WriteInt(File,"FSkin",PlayerInfo[i][pFSkin]);
    INI_WriteInt(File,"OSkin",PlayerInfo[i][pOSkin]);
    INI_WriteInt(File,"Account",PlayerInfo[i][pAccount]);
    INI_WriteInt(File,"Muted",PlayerInfo[i][pMuted]);
    INI_WriteInt(File,"MuteTime",PlayerInfo[i][pMuteTime]);
    INI_Close(File);
          }
    }
	GameModeExitFunc(playerid);
    return 1;
}
Than GameModeExitFunc...
Код:
function GameModeExitFunc(playerid)
{
for(new i=0; i < MAX_PLAYERS; i++)
{
SaveAccountStats(playerid);
}
SetTimer("GmxTimer", 3000, true);
return 1;
}
And the GmxTimer

Код:
public GmxTimer()
{
	SendRconCommand("gmx");
}
Reply
#2

I found this,

http://tutplusplus.blogspot.com/2010...-saveload.html

Hope it helps.
Reply
#3

Nothing helped
Reply
#4

Ehm,

This:

pawn Код:
new INI:File = INI_Open(UserPath(playerid));
Should be:
pawn Код:
new INI:File = INI_Open(UserPath(i));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)