12.10.2014, 08:39
OnPlayerDisconnect
enum
Код:
public OnPlayerDisconnect(playerid, reason) { if(IsBeingSpeced[playerid] == 1) { foreach(Player,i) { if(spectatorid[i] == playerid) { TogglePlayerSpectating(i, 0); } } } new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]); INI_WriteInt(File,"VIP",PlayerInfo[playerid][pVIP]); INI_WriteInt(File,"Wanted",GetPlayerWantedLevel(playerid)); INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]); INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]); INI_WriteInt(File,"Jailed",PlayerInfo[playerid][pJailed]); INI_WriteInt(File,"Muted",PlayerInfo[playerid][pMuted]); INI_WriteInt(File,"Cash",GetPlayerMoney(playerid)); INI_WriteInt(File,"Score",GetPlayerScore(playerid)); INI_WriteInt(File,"Banned",PlayerInfo[playerid][pBanned]); INI_Close(File); IsOnDuty[playerid] = 0; IsGodMode[playerid] = 0; return 1; }
Код:
enum pInfo { pPass, pAdmin, pVIP, pWanted, pKills, pDeaths, pJailed, pMuted, pCash, pScore, pBanned }