Advertisement
Guest User

Untitled

a guest
Aug 14th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.06 KB | None | 0 0
  1. public OnPlayerDisconnect(playerid,reason) {
  2.     KillTimer(TM_AFK[playerid]);
  3.     MoneyTransfer[playerid]=0;
  4.     if(Player[playerid][pMicroBusWork]) DisablePlayerRaceCheckpoint(playerid);
  5.     KillTimer(LoginTimer[playerid]);
  6.     KillTimer(GodTimer[playerid]);
  7.     GodTimer[playerid]=0;
  8.     LoginTimer[playerid]=0;
  9.     LoginTries[playerid]=0;
  10.     DisablePlayerCheckpoint(playerid);
  11.     KillTimer(flood_tm[playerid]);
  12.     KillTimer(chck_next[playerid]);
  13.  
  14.     KillTimer(SpectateTimer[playerid]);
  15.     SpectateTimer[playerid]=0;
  16.     KillTimer(TazTimer[playerid]);
  17.     if(Player[playerid][pAutoSchoolS]!=0) DestroyVehicleEx(Player[playerid][pAutoSchoolS]);
  18.    
  19.     #if defined REMOVEOBJECTS
  20.     if(player_objects_removed{playerid}) player_objects_removed{playerid} = 0;
  21.     #endif
  22.    
  23.     if(Player[playerid][pAveh]!=0) DestroyVehicleEx(Player[playerid][pAveh]);
  24.     if(Player[playerid][pInSalon]!=0) DestroyVehicleEx(Player[playerid][pSalonVeh]);
  25.    
  26.     Player[playerid][pBSTO]=0;
  27.     if(Player[playerid][pRentCar]!=0) {
  28.     SetVehicleToRespawnX(Player[playerid][pRentCar]);
  29.     Player[playerid][pRentCar]=0;
  30.     }
  31.    
  32.     PlayerTextDrawDestroy(playerid, SkinPrice[playerid]);
  33.    
  34.     PlayerTextDrawDestroy(playerid, CarDoors[playerid]);
  35.     PlayerTextDrawDestroy(playerid, CarSpeed[playerid]);
  36.     PlayerTextDrawDestroy(playerid, CarLights[playerid]);
  37.     PlayerTextDrawDestroy(playerid, CarEngine[playerid]);
  38.    
  39.     PlayerTextDrawDestroy(playerid, CardDisplay[playerid]);
  40.    
  41.     PlayerTextDrawDestroy(playerid, CarFuel[playerid]);
  42.     PlayerTextDrawDestroy(playerid, CarHealth[playerid]);
  43.     PlayerTextDrawDestroy(playerid, CarMilage[playerid]);
  44.    
  45.     PlayerTextDrawDestroy(playerid, ASCarName[playerid]);
  46.     PlayerTextDrawDestroy(playerid, ASCarPrice[playerid]);
  47.     PlayerTextDrawDestroy(playerid, ASCarSpeed[playerid]);
  48.     PlayerTextDrawDestroy(playerid, ASCarColor[playerid]);
  49.  
  50.     TextDrawDestroy(CarHealth_ico[playerid]);
  51.     TextDrawDestroy(CarMilage_ico[playerid]);
  52.     TextDrawDestroy(CarFuel_ico[playerid]);
  53.    
  54.     TextDrawDestroy(STODetail_t[playerid]);
  55.     TextDrawDestroy(STOTypeR[playerid]);
  56.     TextDrawDestroy(STOTypeL[playerid]);
  57.     TextDrawDestroy(STOTune_t[playerid]);
  58.     TextDrawDestroy(STOTuneL[playerid]);
  59.     TextDrawDestroy(STOTuneR[playerid]);
  60.     TextDrawDestroy(STOAccept[playerid]);
  61.     TextDrawDestroy(STOExit[playerid]);
  62.  
  63.     KillTimer(SpeedTimer[playerid]);
  64.     KillTimer(TimerCarDraw[playerid]);
  65.     TimerCarDraw[playerid]=0;
  66.     KillTimer(DriftTimerA[playerid]);
  67.     if(PlayerDriftCancellation[playerid] > 0) KillTimer(PlayerDriftCancellation[playerid]);
  68.     PlayerDriftCancellation[playerid] = 0;
  69.     KillTimer(HealTimerA[playerid]);
  70.     KillTimer(DrugsTimerA[playerid]);
  71.    
  72.     OnPlayerSave(playerid);
  73.    
  74.     //-------Delete all cars from user tables
  75.     for(new z=0;z<Player[playerid][pCars];z++)
  76.         for(new pCarInfo:I;I<pCarInfo;++I)
  77.             PlayerCar[playerid][z][I]=0;
  78.     //-----------------------------------------
  79.     if(Player[playerid][pVehPickID]>0) {
  80.     DestroyVehicleEx(Player[playerid][pVehPickID]);
  81.     Delete3DTextLabel(VehNums[Player[playerid][pVehPickID]]);
  82.     }
  83.     for(new pInfo:I;I<pInfo;++I) Player[playerid][I]=0;
  84.     return 1;
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement