Guest User

Untitled

a guest
Jan 10th, 2013
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.85 KB | None | 0 0
  1. public OnPlayerDisconnect(playerid)
  2. {
  3. TextDrawHideForPlayer(playerid, site);
  4.  
  5. gActivePlayers[playerid]--;
  6. numplayers--;
  7. PlayerInfo[playerid][pAdjustable] = 1;
  8. OnPlayerUpdate(playerid);
  9. SetPlayerWantedLevel(playerid, 0);
  10. PlayerInfo[playerid][pSaveWanted] = 0;
  11. for(new i = 0; i < MAX_PLAYERS; i++)
  12. {
  13. if(IsPlayerConnected(i))
  14. {
  15. if(TaxiAccepted[i] < 999)
  16. {
  17. if(TaxiAccepted[i] == playerid)
  18. {
  19. TaxiAccepted[i] = 999;
  20. GameTextForPlayer(i, "~w~Apelare Taxi~n~~r~Left the game", 5000, 1);
  21. TaxiCallTime[i] = 0;
  22. DisablePlayerCheckpoint(i);
  23. }
  24. }
  25. else if(BusAccepted[i] < 999)
  26. {
  27. if(BusAccepted[i] == playerid)
  28. {
  29. BusAccepted[i] = 999;
  30. GameTextForPlayer(i, "~w~Apelare Autoboz~n~~r~Left the game", 5000, 1);
  31. BusCallTime[i] = 0;
  32. DisablePlayerCheckpoint(i);
  33. }
  34. }
  35. }
  36. }
  37. if(GettingCK[playerid] < 999)
  38. {
  39. if(IsPlayerConnected(GettingCK[playerid]))
  40. {
  41. SendClientMessage(GettingCK[playerid], COLOR_YELLOW, "Caracterul tau a parasit serverul va rugam sa reveniti in cel mai scurt timp pe server.");
  42. OnCK[GettingCK[playerid]] = 999;
  43. }
  44. }
  45. if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
  46. {
  47. if(IsPlayerConnected(TransportDriver[playerid]))
  48. {
  49. new string[64];
  50. TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
  51. TransportTime[TransportDriver[playerid]] = 0;
  52. TransportCost[TransportDriver[playerid]] = 0;
  53. format(string, sizeof(string), "~w~Pasagerul a plecat~n~~g~Castig %d lei",TransportCost[playerid]);
  54. GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
  55. }
  56. }
  57. if(GotHit[playerid] > 0)
  58. {
  59. if(GetChased[playerid] < 999)
  60. {
  61. if(IsPlayerConnected(GetChased[playerid]))
  62. {
  63. SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Ai plecat de pe server.");
  64. GoChase[GetChased[playerid]] = 999;
  65. }
  66. }
  67. }
  68. if(PlayerPaintballing[playerid] != 0)
  69. {
  70. PaintballPlayers --;
  71. }
  72. if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
  73. {
  74. KartingPlayers --;
  75. }
  76. if(PlayersChannel[playerid] < 999)
  77. {
  78. IRCInfo[PlayersChannel[playerid]][iPlayers] -= 1;
  79. }
  80. if(HireCar[playerid] != 299)
  81. {
  82. gLastDriver[HireCar[playerid]] = 300;
  83. gCarLock[HireCar[playerid]] = 0;
  84. UnLockCar(HireCar[playerid]);
  85. }
  86. if (gLastCar[playerid] > 0)
  87. {
  88. gLastDriver[gLastCar[playerid]] = 300;
  89. if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
  90. {
  91. gCarLock[gLastCar[playerid]] = 0;
  92. UnLockCar(gLastCar[playerid]);
  93. }
  94. }
  95. if(PlayerBoxing[playerid] > 0)
  96. {
  97. if(Boxer1 == playerid)
  98. {
  99. if(IsPlayerConnected(Boxer2))
  100. {
  101. PlayerBoxing[Boxer2] = 0;
  102. SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
  103. SetPlayerInterior(Boxer2, 5);
  104. GameTextForPlayer(Boxer2, "~r~Meciul a fost intrerupt", 5000, 1);
  105. }
  106. }
  107. else if(Boxer2 == playerid)
  108. {
  109. if(IsPlayerConnected(Boxer1))
  110. {
  111. PlayerBoxing[Boxer1] = 0;
  112. SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
  113. SetPlayerInterior(Boxer1, 5);
  114. GameTextForPlayer(Boxer1, "~r~Meciul a fost intrerupt", 5000, 1);
  115. }
  116. }
  117. InRing = 0;
  118. RoundStarted = 0;
  119. Boxer1 = 255;
  120. Boxer2 = 255;
  121. TBoxer = 255;
  122. }
  123. if(TransportDuty[playerid] == 1)
  124. {
  125. TaxiDrivers -= 1;
  126. }
  127. else if(TransportDuty[playerid] == 2)
  128. {
  129. BusDrivers -= 1;
  130. }
  131. if(PlayerInfo[playerid][pJob] == 11)
  132. {
  133. if(JobDuty[playerid] == 1) { Medics -= 1; }
  134. }
  135. else if(PlayerInfo[playerid][pJob] == 7)
  136. {
  137. if(JobDuty[playerid] == 1) { Mechanics -= 1; }
  138. }
  139. }
Advertisement
Add Comment
Please, Sign In to add comment