18.01.2016, 15:57
Код:
public OnPlayerDisconnect(playerid, reason) { new INI:file = INI_Open(Path(playerid)); INI_SetTag(file,"Player's Data"); INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]); INI_WriteInt(file,"VIPLevel",pInfo[playerid][VIPlevel]); INI_WriteInt(file,"Money",GetPlayerMoney(playerid)); INI_WriteInt(file,"Scores",GetPlayerScore(playerid)); INI_WriteInt(file,"Kills",pInfo[playerid][Kills]); INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]); INI_Close(file); if (GetPVarInt(playerid, "Renting") == 1) IsRented[GetPVarInt(playerid, "CarRentID")] = 0, SetVehicleToRespawn(GetPVarInt(playerid, "CarRentID")); DeletePVar(playerid, "Renting"); DeletePVar(playerid, "CarRentID"); TextDrawHideForPlayer(playerid, money[0]); TextDrawHideForPlayer(playerid, money[1]); TextDrawHideForPlayer(playerid, money[2]); TextDrawHideForPlayer(playerid, money[3]); SaveInventory(playerid); for(new i =0;i<MAX_INVENTOY_SLOTS;i++) PlayerTextDrawDestroy(playerid,InvItem[i]); for(new i=0;i<14;i++) PlayerTextDrawDestroy(playerid,Inventory[i]); PlayerTextDrawDestroy(playerid,TabletWin8UserLog2); PlayerTextDrawDestroy(playerid,TabletWin8Pag2); for(new i = 0; i < 4; i++) PlayerTextDrawDestroy(playerid,Escritorio[i]); for(new i = 0; i < 2; i++) PlayerTextDrawDestroy(playerid,TabletTime[i]); for(new i = 0; i < 3; i++) PlayerTextDrawDestroy(playerid,TabletWeather[i]); for(new i = 0; i < 5; i++) PlayerTextDrawDestroy(playerid,Tragaperras[i]); return 1; }