pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new string[ 124 ];
GetPlayerPos(playerid, PlayerInfo[playerid][pPosX] ,PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ]);
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_WriteFloat(File,"X", PlayerInfo[playerid][pPosX]);
INI_WriteFloat(File,"Y", PlayerInfo[playerid][pPosY]);
INI_WriteFloat(File,"Z", PlayerInfo[playerid][pPosZ]);
INI_WriteInt(File, "Int", GetPlayerInterior(playerid));
INI_WriteInt(File, "VW", GetPlayerVirtualWorld(playerid));
INI_WriteInt(File, "Gender", PlayerInfo[playerid][pGender]);
INI_WriteInt(File, "Skin", GetPlayerSkin(playerid));
INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge]);
INI_WriteInt(File, "Tut", PlayerInfo[playerid][pTut]);
INI_WriteInt(File, "APass", PlayerInfo[playerid][pAPass]);
INI_WriteInt(File, "Leader", PlayerInfo[playerid][pLeader]);
INI_WriteInt(File, "Member", PlayerInfo[playerid][pMember]);
INI_WriteInt(File, "Rank", PlayerInfo[playerid][pRank]);
INI_WriteInt(File, "Job", PlayerInfo[playerid][pJob]);
INI_WriteInt(File, "Muted", PlayerInfo[playerid][pMuted]);
INI_WriteInt(File, "Warned",PlayerInfo[playerid][pWarned]);
INI_WriteInt(File, "PDSkin",PlayerInfo[playerid][pPDutySkin]);
INI_WriteInt(File, "Number",PlayerInfo[playerid][pNumber]);
INI_WriteInt(File, "Phonetype",PlayerInfo[playerid][pPhone]);
INI_WriteInt(File, "PDKey",PlayerInfo[playerid][pPDKey]);
INI_WriteInt(File, "BankAcc",PlayerInfo[playerid][pBankAcc]);
INI_WriteString(File, "BankNum",PlayerInfo[playerid][pBankNum]);
INI_WriteInt(File, "BankAmount",PlayerInfo[playerid][pBankAmount]);
INI_WriteInt(File, "Frozen",PlayerInfo[playerid][pFrozen]);
INI_WriteInt(File, "PayCheck",PlayerInfo[playerid][pPayCheck]);
INI_WriteInt(File, "PayTime",PlayerInfo[playerid][pPayTime]);
INI_WriteInt(File, "PayTotal",PlayerInfo[playerid][pPayTotal]);
INI_Close(File);
PlayerInfo[playerid][pALogged] = 0;
PlayerInfo[playerid][pADuty] = 0;
PlayerInfo[playerid][pPDuty] = 0;
foreach(Player, x)
{
if(PlayerInfo[x][pAdmin] >= 2)
{
format(string, 124, "[%i]%s has disconnected from the server.", playerid,pName(playerid));
SendClientMessage(x, COLOR_PURPLE, string);
}
}
PlayerInfo[playerid][pPhoneCall] = 0;
return 1;
}