08.12.2012, 12:00
(
Последний раз редактировалось luis_mendoza; 08.12.2012 в 12:32.
)
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.
Than GameModeExitFunc...
And the GmxTimer
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; }
Код:
function GameModeExitFunc(playerid) { for(new i=0; i < MAX_PLAYERS; i++) { SaveAccountStats(playerid); } SetTimer("GmxTimer", 3000, true); return 1; }
Код:
public GmxTimer() { SendRconCommand("gmx"); }