Advertisement
Sem_Loreann

Untitled

Apr 30th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 0
  1. public OnPlayerDisconnect(playerid, reason)
  2. {
  3. if(PlayerInfo[playerid][pLogged] == true)
  4. {
  5. if(GetPVarInt(playerid, "P_CUFFED") > 0)
  6. {
  7. ResetWeapons(playerid);
  8. DeletePVar(playerid, "P_CUFFED");
  9. PlayerInfo[playerid][pArrests]++;
  10. PlayerInfo[playerid][pWanted] = 0;
  11. PlayerInfo[playerid][pJailTime] = 60 * 60;
  12. PlayerInfo[playerid][pJail] = 1;
  13. }
  14. if(GetPlayerCar(playerid) == true)
  15. {
  16. new i = GetPVarInt(playerid, "PLAYER_CAR");
  17. if(i != INVALID_VEHICLE_ID)
  18. {
  19. if(reason == 0 || reason == 2)
  20. {
  21. VehicleInfo[i][vLock] = 1;
  22. UpdateHouseCar(i);
  23. }
  24. else SaveHouseCar(i);
  25. }
  26. }
  27. for(new i = 0; i < 5; i++)
  28. {
  29. if(Broadcast[PlayerInfo[playerid][pRadio]][0] == true)
  30. {
  31. if(PlayerInChannel[PlayerInfo[playerid][pRadio]][i] == INVALID_PLAYER_ID) continue;
  32. else if(PlayerInChannel[PlayerInfo[playerid][pRadio]][i] == playerid)
  33. {
  34. PlayerInChannel[PlayerInfo[playerid][pRadio]][i] = INVALID_PLAYER_ID;
  35. format(var, 54, "[Эфир] %s покинул(а) радиоэфир.", GetName(playerid));
  36. SendFMes(F_NEWS, 0x597d8bFF, var);
  37. break;
  38. }
  39. }
  40. }
  41. PlayerInfo[playerid][pOnlineTime] += (NetStats_GetConnectedTime(playerid) / 1000);
  42. PlayerInfo[playerid][pLogged] = false;
  43. SaveAccount(playerid);
  44. }
  45. KillTimer(PlayerInfo[playerid][PlayerSecTimer]);
  46. for(new i = 0; i < 21; ++i) PlayerTextDrawDestroy(playerid, Speed[playerid][i]);
  47. for(new i = 0; i < 6; i++) PlayerTextDrawDestroy(playerid, Capture[playerid][i]);
  48. for(new i = 0; i < 16; i++) PlayerTextDrawDestroy(playerid, CarShop[playerid][i]);
  49. for(new i = 0; i < 18; i++) PlayerTextDrawDestroy(playerid, Filling[playerid][i]);
  50. for(new i = 1; i <= TOTALGZ; i++) GangZoneHideForPlayer(playerid, GZInfo[i][gzID]);
  51.  
  52. if(PlantObject[playerid] != -1) // есть
  53. {
  54. DestroyObject(PlantObject[playerid]);
  55. PlantObject[playerid] = -1;
  56. }
  57. injob[playerid] = 0; // есть
  58. bag[playerid] = 0; // есть
  59. pCheckpoint[playerid] = 0; // есть
  60.  
  61. cexjob[playerid] = 0; // есть
  62. Workpiece[playerid] = 0; // есть
  63. pKeyJob[playerid] = 0; // есть
  64. pKeys[playerid] = 0; // есть
  65. pKeyTime[playerid] = 0; // есть
  66. pProverka[playerid] = 0; // есть
  67. pTimeJob[playerid] = 0;
  68. pGPS[playerid] = 0; // есть
  69.  
  70. pNewJob[playerid] = 0;
  71. newjob[playerid] = 0;
  72. WorkCar[playerid] = 0;
  73. DestroyVehicle(carjob[playerid]);
  74. carjob[playerid] = -1;
  75.  
  76. pDeath[playerid] = 0;
  77. CheckCountGames[playerid] = 0;
  78.  
  79. TextDrawHideForPlayer(playerid, Logo[0]);
  80. TextDrawHideForPlayer(playerid, Logo[1]);
  81. TextDrawHideForPlayer(playerid, Logo[2]);
  82.  
  83. if(PlayerInfo[playerid][pSend][4] == 1)
  84. {
  85. TextDrawHideForPlayer(playerid, hunger_TD[0]);
  86. TextDrawHideForPlayer(playerid, hunger_TD[1]);
  87. PlayerTextDrawHide(playerid, hunger_PTD[playerid][0]);
  88. PlayerTextDrawHide(playerid, hunger_PTD[playerid][1]);
  89. }
  90.  
  91. TextDrawHideForPlayer(playerid, games_TD[0]);
  92. TextDrawHideForPlayer(playerid, games_TD[1]);
  93. TextDrawHideForPlayer(playerid, games_TD[2]);
  94. TextDrawHideForPlayer(playerid, games_TD[3]);
  95. TextDrawHideForPlayer(playerid, games_TD[4]);
  96. TextDrawHideForPlayer(playerid, games_TD[5]);
  97. PlayerTextDrawHide(playerid, games_PTD[playerid]);
  98. return true;
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement