19.12.2012, 09:06
well, my saving system can't save money...
Код:
public OnPlayerDisconnect(playerid, reason) { OnPlayerLogout(playerid); SendDeathMessage(INVALID_PLAYER_ID,playerid, 201); return 1; }
Код:
OnPlayerLogout(playerid) { new uFile[35]; format(uFile, 35, USER_FILE, PlayerName(playerid)); new INI:playerFile = INI_Open(uFile); INI_WriteInt(playerFile, "Admin", PlayerInfo[playerid][pAdmin]); INI_WriteInt(playerFile, "VIP", PlayerInfo[playerid][CHB]); INI_WriteInt(playerFile, "Novac", PlayerInfo[playerid][pMoney]); INI_WriteInt(playerFile, "Skin", GetPlayerSkin(playerid)); INI_WriteInt(playerFile, "Warn", PlayerInfo[playerid][warn]); INI_WriteInt(playerFile, "Ubojstva", PlayerInfo[playerid][pKills]); INI_WriteInt(playerFile, "Lider", PlayerInfo[playerid][Lider]); INI_WriteInt(playerFile, "Clan", PlayerInfo[playerid][Clan]); INI_WriteInt(playerFile, "Rank", PlayerInfo[playerid][Rank]); INI_WriteInt(playerFile, "Smrti", PlayerInfo[playerid][pDeaths]); INI_WriteInt(playerFile, "Minute", PlayerInfo[playerid][Minute]); INI_Close(playerFile); return 1; }