19.01.2013, 07:45
(
Последний раз редактировалось Blast3r; 19.01.2013 в 10:12.
)
Quote:
Reset the variables also when the player leaves (OnPlayerDisconnect()) - After the player stats get saved.
|
Код:
public OnPlayerDisconnect(playerid, reason) { new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Cash",GetPlayerMoney(playerid)); INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]); INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]); INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]); INI_WriteInt(File,"Score",PlayerInfo[playerid][pScore]); INI_WriteInt(File,"Rank",PlayerInfo[playerid][pRank]); INI_WriteInt(File,"VIP",PlayerInfo[playerid][pVip]); INI_WriteInt(File,"Warns",PlayerInfo[playerid][pWarn]); INI_WriteInt(File,"Banned",PlayerInfo[playerid][pBanned]); INI_Close(File); KillStreak[playerid] = 0; return 1; }
EDIT: I fixed it, thx a lot for your help