09.12.2012, 11:17
Код:
public OnPlayerDisconnect(playerid, reason) { SendDeathMessage(INVALID_PLAYER_ID, playerid, 201); OyuncuEv[playerid] = -1; EvEditleniyor[GetHouseID(playerid)] = false; OyuncuKontrolEv[playerid]=-255; if(PlayerInfo[playerid][LoggedIn] == 1) SavePlayer(playerid); dUserSetINT(PlayerName2(playerid)).("loggedin", 0); dUserSetINT(PlayerName2(playerid)).("score", PlayerInfo[playerid][score]); dUserSetINT(PlayerName2(playerid)).("money", PlayerInfo[playerid][money]); dUserSetINT(PlayerName2(playerid)).("money", GetPlayerMoney(playerid)); objesilici(playerid); HizAc[playerid] = false; if((PlayerInfo[playerid][Level] >= 1 || PlayerInfo[playerid][Animator] >= 1) || PlayerInfo[playerid][Animator] >= 1){DestroyDynamic3DTextLabel(label1[playerid]);} if(Araba[playerid] == 1) if(!DestroyKontrol(ivehicle[playerid])) DestroyVehicle(ivehicle[playerid]), Araba[playerid] = 0; TextDrawHideForPlayer(playerid,esp[playerid]); TextDrawHideForPlayer(playerid, Arackomutlari); TextDrawHideForPlayer(playerid,Text:AltMenu); TextDrawHideForPlayer(playerid,Text:zx1); TextDrawHideForPlayer(playerid,Text:zx2); //TextDrawHideForPlayer(playerid,Text:AltMenu1); TextDrawHideForPlayer(playerid,Text:AltMenu3); TextDrawHideForPlayer(playerid, TextDraw1); TextDrawHideForPlayer(playerid, TextDraw2); TextDrawDestroy(esp[playerid]); TextDrawDestroy(Sayac[playerid]); karsitaraf[playerid] = 0; kayitbekle[playerid] = false; oyuncuuyarildi[playerid] = false; uyardim[playerid] = false; //raceWarnings[playerid] = 0; //Light Sistemi EklenenLight[playerid]=0; //----------------------- PlayerInfo[playerid][magnet] = 0; SetPlayerColor(playerid, COLOR_RED); DestroyDynamic3DTextLabel(Text2[playerid]); DestroyDynamic3DTextLabel(Text[playerid]); if(reason == 0) SQLServerInfo[sTimeouts]++; //savas sistemi //savasakatilmis[playerid] = 0; reportbirikim[playerid] = 0; ghostrider[playerid] = 0; Spectekiler[playerid] = 0; KillTimer(playertimer[playerid]); if(airb[playerid] == 1){ DestroyVehicle(aircar[playerid]); DestroyObject(road[playerid]); } airb[playerid] = 0; IsInBus[playerid] = 0; InAmbu[playerid] = 0; Watching[playerid] = 0; Goto[playerid] = 0; yazdim[playerid] = 0; TextDrawHideForPlayer(playerid,Bilgi1[playerid]); TextDrawHideForPlayer(playerid,Bilgi2[playerid]); if(PlayerInfo[playerid][Jailed] == 1) KillTimer( JailTimer[playerid] ); if(PlayerInfo[playerid][Frozen] == 1) KillTimer( FreezeTimer[playerid] ); if(ServerInfo[Locked] == 1) KillTimer( LockKickTimer[playerid] ); if(PlayerInfo[playerid][pCar] != -1) CarDeleter(PlayerInfo[playerid][pCar]); #if defined ENABLE_SPEC for(new x=0; x<MAX_PLAYERS; x++) if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && PlayerInfo[x][SpecID] == playerid) AdvanceSpectate(x); #endif ResetPlayerInfo(playerid); gidisizni[playerid] = 0; new i2; for(i2=0;i2<MAX_VEHICLES;i2++) { if (locked[playerid][i2] == 1) { new i; for(i=0;i<MAX_PLAYERS;i++) { SetVehicleParamsForPlayer(i2,i, 0, 0); } } locked[playerid][i2] = 0; } return 1; }