erewefrfwfrewq

Untitled

Nov 8th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.69 KB | None | 0 0
  1. public OtherTimer(playerid)
  2. {
  3.  
  4. wct = 0, ws = "WANTED LIST~n~~n~ ";
  5. foreach(new i : Player) if(pInfo[i][pStatus] == 1)
  6. {
  7. pInfo[i][aVar][10]++;
  8. if(IsPlayerInAnyVehicle(i))
  9. {
  10. ci = GetPlayerSpeed(i, 0), GetVehicleHealth(pInfo[i][aVar][1], hpvv), GetVehicleParamsEx(pInfo[i][aVar][1], vParams[0],vParams[1],vParams[2],vParams[3],vParams[4],vParams[5],vParams[6]),
  11. format(SpStr, sizeof(SpStr), "Speed: ~y~%d km/h", ci), PlayerTextDrawSetString(i, TSpeedometer[i][0], SpStr),
  12. format(SpStr, sizeof(SpStr), "Status: %s ~w~/ ~y~%0.0f%", vParams[3] <= 0 ? ("~y~Unlocked") : ("~r~Locked"), hpvv), PlayerTextDrawSetString(i, TSpeedometer[i][2], SpStr);
  13. if(vVar[3][pInfo[i][aVar][1]] <= 0 ? format(SpStr, sizeof(SpStr), "Fuel: ~r~No fuel") : format(SpStr, sizeof(SpStr), "Fuel: ~y~%d%", vVar[3][pInfo[i][aVar][1]]))
  14. PlayerTextDrawSetString(i, TSpeedometer[i][1], SpStr);
  15. if(vVar[1][pInfo[i][aVar][1]] == 1 && !IsPlayerAfk(i)) format(SpStr, sizeof(SpStr), "Kilometers: ~y~%.0f", KMVeh[pInfo[i][aVar][1]]), PlayerTextDrawSetString(i, TSpeedometer[i][3], SpStr), KMVeh[pInfo[i][aVar][1]] += ci*0.0006;
  16. if(pInfo[i][aVar][72] > -1 && pInfo[i][pJob] == 4 && vVar[1][pInfo[i][aVar][72]] == 0) format(SpStr, sizeof(SpStr), "Distance: ~y~%0.2fm", GetPlayerDistanceFromPoint(i, pInfo[i][PosW][0], pInfo[i][PosW][1], pInfo[i][PosW][2])), PlayerTextDrawSetString(i, RaceAr[i], SpStr);
  17. if(ci > 220 && GetPlayerState(i) == PLAYER_STATE_DRIVER && !BreakSC(pInfo[i][aVar][1]))
  18. format(AdminWText, sizeof(AdminWText), "FiveGame: {D67ED5} Anti-Cheat: %s{51C255} is suspected of Speed Hack, check it! [Speed: %d km/h | Vehicle: %s]", GetName(i), ci, g_VehicleNames[GetVehicleModel(pInfo[i][aVar][1])-400]), SendAdminMessage(i, COLOR_ADMWARNING, AdminWText);
  19. }
  20. // ----------------by Andu
  21. if(IsPlayerConnected(i))
  22. {
  23. if(timpinchiriere[i] > 0)
  24. {
  25. timpinchiriere[i] --;
  26. }
  27. if(timpinchiriere[i] == 1)
  28. {
  29. ShowPlayerDialog(i, DIALOG_INCHIRIERECONT, DIALOG_STYLE_MSGBOX, "{ffffff}Prelungire:", "{ffffff}Timpul de inchiriere a expirat, vrei sa prelugnesti in continuare?", "Da", "Nu");
  30. }
  31. }
  32.  
  33. if(GetPlayerSpeedd(playerid) > 60 && strcmp(AnimLib, "PARACHUTE", true) == 0 && strcmp(AnimName, "FALL_SKYDIVE_ACCEL", true) == 0)
  34. {
  35. new lstring[110];
  36. format(lstring, sizeof (lstring), "FiveGame: {D67ED5}%s {51C255}a fost deconectat, motiv:{ADD63C} Fly Hack!", GetPlayerName(playerid));
  37. SendClientMessage(playerid, -1, lstring);
  38. Kick(playerid);
  39. }
  40.  
  41.  
  42. // ----------------
  43. if(pInfo[i][pTog][7] == 1)
  44. {
  45. drunk2 = GetPlayerDrunkLevel(i);
  46. if(drunk2 < 100) SetPlayerDrunkLevel(i,2000);
  47. else
  48. {
  49. if(pInfo[i][aVar][105] != drunk2)
  50. {
  51. fps = pInfo[i][aVar][105] - drunk2;
  52. if((fps > 0) && (fps < 200))
  53. pInfo[i][aVar][106] = fps;
  54. pInfo[i][aVar][105] = drunk2;
  55. }
  56. }
  57. format(pInfo[i][pGText], 20, "%d~W~~n~~r~~h~%d", pInfo[i][aVar][106]-1, GetPlayerPing(i)), PlayerTextDrawSetString(i, Textdraw15[i], pInfo[i][pGText]);
  58. }
  59. if(pInfo[i][aVar][70] > -1 && pInfo[pInfo[i][aVar][70]][pStatus] == 1)
  60. {
  61. if(innt[pInfo[i][aVar][70]] != innt[i] || vwp[pInfo[i][aVar][70]] != vwp[i])
  62. SetPlayerInteriorEx(i, innt[pInfo[i][aVar][70]]), SetPlayerVirtualWorldEx(i, vwp[pInfo[i][aVar][70]]), PlayerSpectatePlayer(i, pInfo[i][aVar][70]);
  63. if(IsPlayerInAnyVehicle(pInfo[i][aVar][70]) && pInfo[i][aVar][116] != 1) pInfo[i][aVar][116] = 1, PlayerSpectateVehicle(i, pInfo[pInfo[i][aVar][70]][aVar][1]);
  64. if((!IsPlayerInAnyVehicle(pInfo[i][aVar][70])) && pInfo[i][aVar][116] != 2) pInfo[i][aVar][116] = 2, PlayerSpectatePlayer(i, pInfo[i][aVar][70]);
  65. format(MSt, sizeof(MSt), "Name: ~y~%s ~w~(~y~%d~w~)", GetName(pInfo[i][aVar][70]), pInfo[i][aVar][70]), PlayerTextDrawSetString(i, Spectate[i][0], MSt);
  66. GetPlayerHealth(pInfo[i][aVar][70], health);
  67. format(MSt, sizeof(MSt), "Health: ~y~%.1f", health), PlayerTextDrawSetString(i, Spectate[i][1], MSt);
  68. GetPlayerArmour(pInfo[i][aVar][70], health);
  69. format(MSt, sizeof(MSt), "Armour: ~y~%.1f", health), PlayerTextDrawSetString(i, Spectate[i][2], MSt);
  70. if(IsPlayerInAnyVehicle(pInfo[i][aVar][70])) GetVehicleHealth(pInfo[pInfo[i][aVar][70]][aVar][1], xx);
  71. format(MSt, sizeof(MSt), IsPlayerInAnyVehicle(pInfo[i][aVar][70]) ? ("Speed: ~y~%d km/h (%.1f HP)") : (""), GetPlayerSpeed(pInfo[i][aVar][70], 0), xx), PlayerTextDrawSetString(i, Spectate[i][3], MSt);
  72. }
  73. if(pInfo[i][pTog][6] == 1) GetPlayerHealth(i, ph), format(MSt, sizeof(MSt), "%0.0f", ph), PlayerTextDrawSetString(i, HH[i], MSt);
  74. if(pInfo[i][aVar][113] != 0 && pInfo[i][aVar][113] < gtm) format(stmsg[i], 100, "Time is over, you lose the keys from %s.", g_VehicleNames[GetVehicleModel(Veh[pInfo[i][aVar][109]][pInfo[i][aVar][110]][ServerID])-400]), SendClientMessage(i, COLOR_YELLOW, stmsg[i]), pInfo[i][aVar][109] = -1, pInfo[i][aVar][110] = -1, pInfo[i][aVar][113] = 0;
  75. if(pInfo[i][aVar][109] != -1 && ((Veh[pInfo[i][aVar][109]][pInfo[i][aVar][110]][vSp] == 1) || GetVehicleModel(Veh[pInfo[i][aVar][109]][pInfo[i][aVar][110]][ServerID]) != Veh[pInfo[i][aVar][109]][pInfo[i][aVar][110]][Model] || pInfo[pInfo[i][aVar][109]][pID] != Veh[pInfo[i][aVar][109]][pInfo[i][aVar][110]][Owner])) SendClientMessage(i, COLOR_YELLOW, "You lose the keys from vehicle, vehicle destroyed or vehicle was sold."),
  76. pInfo[i][aVar][109] = -1, pInfo[i][aVar][110] = -1, pInfo[i][aVar][113] = 0;
  77. if(pInfo[i][pMute] > 0)
  78. {
  79. pInfo[i][pMute]--;
  80. if(pInfo[i][pMute] == 0) pInfo[i][pMute] = -1, SendClientMessage(i, -1, "* Your mute time has expired.");
  81. }
  82. if(pInfo[i][pWantedLevel] > 0)
  83. {
  84. pInfo[i][pExpWtd]--;
  85. format(MSt, sizeof(MSt), "~r~%d ~w~~h~minutes left", pInfo[i][pExpWtd]/60), PlayerTextDrawSetString(i, ExpWanted[i], MSt);
  86. if(pInfo[i][pExpWtd] < 60)
  87. {
  88. pInfo[i][pWantedLevel]--, pInfo[i][pExpWtd] = 480, SetPlayerWantedLevel(i, pInfo[i][pWantedLevel]);
  89. if(pInfo[i][pWantedLevel] == 0) pInfo[i][pExpWtd] = 0, pInfo[i][pSuu] = 0, PlayerTextDrawHide(i, ExpWanted[i]);
  90. }
  91. if(wct < 10) wct++, format(ws, 339, "%s%s (%d) - %s%d~n~~w~~h~", ws, GetName(i), i, pInfo[i][pSuu] == 0 ? ("~g~") : ("~r~"), pInfo[i][pWantedLevel]);
  92. }
  93. if(pInfo[i][pJailed] >= 1)
  94. {
  95. pInfo[i][pJailed]--;
  96. format(MSt, sizeof(MSt), "Jail time left: ~r~%i sec.", pInfo[i][pJailed]), PlayerTextDrawSetString(i, TJailed[i], MSt);
  97. if(pInfo[i][pJailed] < 1) pInfo[i][pJailed] = -1, PlayerTextDrawHide(i, TJailed[i]), SetPlayerVirtualWorldEx(i, 0),
  98. SetPlayerPos(i, 1542.2871,-1675.4178,13.5542), GameTextForPlayer(i, "~w~ai fost eliberat", 1000, 1), RemovePlayerAttachedObject(i, 7), DisablePlayerCheckpoint(i), CP[i] = 0;
  99. }
  100. if(pInfo[i][pAJailed] >= 1)
  101. {
  102. pInfo[i][pAJailed]--;
  103. format(MSt, sizeof(MSt), "AJail time left: ~r~%i sec.", pInfo[i][pAJailed]), PlayerTextDrawSetString(i, TJailed[i], MSt);
  104. if(pInfo[i][pAJailed] == 0) pInfo[i][pAJailed] = -1, PlayerTextDrawHide(i, TJailed[i]),
  105. SpawnPlayer(i), GameTextForPlayer(i, "~w~ai fost eliberat", 1000, 1);
  106. } ///1790.2830,-1907.5171,13.3968 spawncivil
  107. if(pInfo[i][aVar][85] == 0 && (IsPlayerInRangeOfPoint(i, 40.0, 1107.8771,-1794.3970,16.6937) || IsPlayerInRangeOfPoint(i, 85.0, 1254.3804,-755.3613,5083.5054) || IsPlayerInRangeOfPoint(i, 20.0, 1168.6505,-1489.7057,22.7568) || IsPlayerInRangeOfPoint(i, 45.0, -60.6408,-1128.0583,1.1781) ||
  108. IsPlayerInRangeOfPoint(i, 15.0, 2102.3037,2235.5540,11.0234) || IsPlayerInRangeOfPoint(i, 15.0, 1178.9655,-1323.4093,14.1461) || IsPlayerInRangeOfPoint(i, 15.0, 332.0587,-1516.1661,35.9672) ||
  109. IsPlayerInRangeOfPoint(i, 15.0, 545.5265,-1283.1184,17.2482) || IsPlayerInRangeOfPoint(i, 15.0, 1628.1425,584.9908,1.7578) || IsPlayerInRangeOfPoint(i, 18.0, 2131.2944,1403.6899,11.1328) || IsPlayerInRangeOfPoint(i, 10.0, -566.2581,-1600.5735,-41.9882) || IsPlayerInRangeOfPoint(i, 90.0, -1424.7450,1615.7667,1052.5313) || IsPlayerInRangeOfPoint(i, 250.0, -376.1633,-1432.8551,25.7266)
  110. || (IsPlayerInRangeOfPoint(i, 25.0, -2801.5784,1784.9972,144.9927) && innt[i] == 2) || (IsPlayerInRangeOfPoint(i, 15.0, 2312.3843,-7.3693,26.7422) && (vwp[i] == 18 || vwp[i] == 54)) || (IsPlayerInRangeOfPoint(i, 15.0, 825.2582,5.4109,1004.1870) && innt[i] == 3)))
  111. TextDrawShowForPlayer(i, SafeZ), pInfo[i][aVar][85] = 1;
  112. //1790.2830,-1907.5171,13.3968 spawncivil
  113. if(pInfo[i][aVar][85] == 1 && !(IsPlayerInRangeOfPoint(i, 40.0, 1107.8771,-1794.3970,16.6937) || IsPlayerInRangeOfPoint(i, 85.0, 1254.3804,-755.3613,5083.5054) || IsPlayerInRangeOfPoint(i, 20.0, 1168.6505,-1489.7057,22.7568) || IsPlayerInRangeOfPoint(i, 45.0, -60.6408,-1128.0583,1.1781) ||
  114. IsPlayerInRangeOfPoint(i, 25.0, 2102.3037,2235.5540,11.0234) || IsPlayerInRangeOfPoint(i, 25.0, 1178.9655,-1323.4093,14.1461) || IsPlayerInRangeOfPoint(i, 25.0, 332.0587,-1516.1661,35.9672) ||
  115. IsPlayerInRangeOfPoint(i, 25.0, 545.5265,-1283.1184,17.2482) || IsPlayerInRangeOfPoint(i, 30.0, 1628.1425,584.9908,1.7578) || IsPlayerInRangeOfPoint(i, 28.0, 2131.2944,1403.6899,11.1328) || IsPlayerInRangeOfPoint(i, 50.0, -566.2581,-1600.5735,-41.9882) || IsPlayerInRangeOfPoint(i, 90.0, -1424.7450,1615.7667,1052.5313) || IsPlayerInRangeOfPoint(i, 250.0, -376.1633,-1432.8551,25.7266)
  116. || (IsPlayerInRangeOfPoint(i, 25.0, -2801.5784,1784.9972,144.9927) && innt[i] == 2) || (IsPlayerInRangeOfPoint(i, 25.0, 2312.3843,-7.3693,26.7422) && (vwp[i] == 18 || vwp[i] == 54)) || (IsPlayerInRangeOfPoint(i, 35.0, 825.2582,5.4109,1004.1870) && innt[i] == 3)))
  117. TextDrawHideForPlayer(i, SafeZ), pInfo[i][aVar][85] = 0;
  118.  
  119. if(pInfo[i][aVar][71] != 0 && pInfo[i][aVar][71] < gtm) pInfo[i][aVar][71] = 0, TogglePlayerControllable(i, 1);
  120. if(pInfo[i][aVar][36] == 2 && (IsPlayerInRangeOfPoint(i, 3.0, 1025.0500,-1024.2300,32.1016) || IsPlayerInRangeOfPoint(i, 3.3, 487.6800,-1740.8700,11.1395) || IsPlayerInRangeOfPoint(i, 3.3, -1421.0455,2583.3281,55.8433) || IsPlayerInRangeOfPoint(i, 3.3, -1904.3900,284.9700,41.0469)
  121. || IsPlayerInRangeOfPoint(i, 3.0, -2425.9099,1022.3300,50.3977) || IsPlayerInRangeOfPoint(i, 3.2, 1975.6000,2162.1599,11.0703) || IsPlayerInRangeOfPoint(i, 3.2, 2065.3799,-1831.5100,13.54693) || IsPlayerInRangeOfPoint(i, 3.2, -99.5500,1118.3600,19.7417) || IsPlayerInRangeOfPoint(i, 3.2, 721.0700,-455.9400,16.3359)))
  122. {
  123. SendClientMessage(i, COLOR_YELLOW, "Vehiculul a fost modificat cu succes, transporta sacul cu bani la checkpoint-ul de pe harta."), pInfo[i][aVar][36] = 1;
  124. new rand = random(sizeof(rb));
  125. SetPlayerCheckpoint(i, rb[rand][0], rb[rand][1], rb[rand][2], 6.5), CP[i] = 73;
  126. }
  127. if(GetPlayerMoney(i) != pInfo[i][pMoney]) ResetPlayerMoney(i), GivePlayerMoney(i, pInfo[i][pMoney]);
  128. if(pInfo[i][pPremium] != 0 && pInfo[i][pPremium] < gtm) SendClientMessage(i, COLOR_LIGHTRED, "* Your premium account has expired."), pInfo[i][pPremium] = 0;
  129. if(WType == 1 && (WarOnOff > 0 || War2OnOff > 0) && pInfo[i][aVar][70] == -1)
  130. {
  131. if(Iter_Contains(Warp, i))
  132. {
  133. if(pInfo[i][aVar][79] == 0 && IsPlayerInArea(i, Turfs[WarNR-1][MinX],Turfs[WarNR-1][MinY],Turfs[WarNR-1][MaxX],Turfs[WarNR-1][MaxY])) pInfo[i][aVar][79] = 1;
  134. if(pInfo[i][aVar][79] == 1 && !IsPlayerInArea(i, Turfs[WarNR-1][MinX],Turfs[WarNR-1][MinY],Turfs[WarNR-1][MaxX],Turfs[WarNR-1][MaxY])) pInfo[i][aVar][79] = gtm+5;
  135. if(pInfo[i][aVar][79] > 1 && IsPlayerInArea(i, Turfs[WarNR-1][MinX],Turfs[WarNR-1][MinY],Turfs[WarNR-1][MaxX],Turfs[WarNR-1][MaxY])) pInfo[i][aVar][79] = 0;
  136. if(pInfo[i][aVar][79] > 1 && !IsPlayerInArea(i, Turfs[WarNR-1][MinX],Turfs[WarNR-1][MinY],Turfs[WarNR-1][MaxX],Turfs[WarNR-1][MaxY]))
  137. {
  138. format(stmsg[i], 80, "You have %d seconds to return on turf otherwise you will automatically killed.", pInfo[i][aVar][79]-gtm), SendClientMessage(i, COLOR_DARKGRAY, stmsg[i]);
  139. if(pInfo[i][aVar][79] == gtm)
  140. {
  141. pInfo[i][aVar][79] = 0, SetPlayerHealth(i, 0);
  142. new result[44];
  143. switch(Defend) {
  144. case 9: if(pInfo[i][pMember] == Attack) WarKills2++, format(result, sizeof(result), "Grove Street: ~p~%d kills", WarKills2), TextDrawSetString(WarTD[3], result);
  145. case 10: if(pInfo[i][pMember] == Attack) WarKills2++, format(result, sizeof(result), "The Ballas Family: ~p~%d kills", WarKills2), TextDrawSetString(WarTD[3], result);
  146. case 11: if(pInfo[i][pMember] == Attack) WarKills2++, format(result, sizeof(result), "Los Santos Vagos: ~p~%d kills", WarKills2), TextDrawSetString(WarTD[3], result);
  147. case 12: if(pInfo[i][pMember] == Attack) WarKills2++, format(result, sizeof(result), "La Cosa Nostra: ~p~%d kills", WarKills2), TextDrawSetString(WarTD[3], result);
  148. }
  149. switch(Attack) {
  150. case 9: if(pInfo[i][pMember] == Defend) WarKills1++, format(result, sizeof(result), "Grove Street: ~p~%d kills", WarKills1), TextDrawSetString(WarTD[2], result);
  151. case 10: if(pInfo[i][pMember] == Defend) WarKills1++, format(result, sizeof(result), "The Ballas Family: ~p~%d kills", WarKills1), TextDrawSetString(WarTD[2], result);
  152. case 11: if(pInfo[i][pMember] == Defend) WarKills1++, format(result, sizeof(result), "Los Santos Vagos: ~p~%d kills", WarKills1), TextDrawSetString(WarTD[2], result);
  153. case 12: if(pInfo[i][pMember] == Defend) WarKills1++, format(result, sizeof(result), "La Cosa Nostra: ~p~%d kills", WarKills1), TextDrawSetString(WarTD[2], result);
  154. }
  155. }
  156. }
  157. }
  158. if(Iter_Contains(Warp2, i))
  159. {
  160. if(pInfo[i][aVar][79] == 0 && IsPlayerInArea(i, Turfs[War2NR-1][MinX],Turfs[War2NR-1][MinY],Turfs[War2NR-1][MaxX],Turfs[War2NR-1][MaxY])) pInfo[i][aVar][79] = 1;
  161. if(pInfo[i][aVar][79] == 1 && !IsPlayerInArea(i, Turfs[War2NR-1][MinX],Turfs[War2NR-1][MinY],Turfs[War2NR-1][MaxX],Turfs[War2NR-1][MaxY])) pInfo[i][aVar][79] = gtm+5;
  162. if(pInfo[i][aVar][79] > 1 && IsPlayerInArea(i, Turfs[War2NR-1][MinX],Turfs[War2NR-1][MinY],Turfs[War2NR-1][MaxX],Turfs[War2NR-1][MaxY])) pInfo[i][aVar][79] = 0;
  163. if(pInfo[i][aVar][79] > 1 && !IsPlayerInArea(i, Turfs[War2NR-1][MinX],Turfs[War2NR-1][MinY],Turfs[War2NR-1][MaxX],Turfs[War2NR-1][MaxY]))
  164. {
  165. format(stmsg[i], 80, "You have %d seconds to return on turf otherwise you will automatically killed.", pInfo[i][aVar][79]-gtm), SendClientMessage(i, COLOR_DARKGRAY, stmsg[i]);
  166. if(pInfo[i][aVar][79] == gtm)
  167. {
  168. pInfo[i][aVar][79] = 0, SetPlayerHealth(i, 0);
  169. new result[44];
  170. switch(Defend2) {
  171. case 9: if(pInfo[i][pMember] == Attack2) War2Kills2++, format(result, sizeof(result), "Grove Street: ~p~%d kills", War2Kills2), TextDrawSetString(War2TD[3], result);
  172. case 10: if(pInfo[i][pMember] == Attack2) War2Kills2++, format(result, sizeof(result), "The Ballas Family: ~p~%d kills", War2Kills2), TextDrawSetString(War2TD[3], result);
  173. case 11: if(pInfo[i][pMember] == Attack2) War2Kills2++, format(result, sizeof(result), "Los Santos Vagos: ~p~%d kills", War2Kills2), TextDrawSetString(War2TD[3], result);
  174. case 12: if(pInfo[i][pMember] == Attack2) War2Kills2++, format(result, sizeof(result), "La Cosa Nostra: ~p~%d kills", War2Kills2), TextDrawSetString(War2TD[3], result); }
  175. switch(Attack2) {
  176. case 9: if(pInfo[i][pMember] == Defend2) War2Kills1++, format(result, sizeof(result), "Grove Street: ~p~%d kills", War2Kills1), TextDrawSetString(War2TD[2], result);
  177. case 10: if(pInfo[i][pMember] == Defend2) War2Kills1++, format(result, sizeof(result), "The Ballas Family: ~p~%d kills", War2Kills1), TextDrawSetString(War2TD[2], result);
  178. case 11: if(pInfo[i][pMember] == Defend2) War2Kills1++, format(result, sizeof(result), "Los Santos Vagos: ~p~%d kills", War2Kills1), TextDrawSetString(War2TD[2], result);
  179. case 12: if(pInfo[i][pMember] == Defend2) War2Kills1++, format(result, sizeof(result), "La Cosa Nostra: ~p~%d kills", War2Kills1), TextDrawSetString(War2TD[2], result); }
  180. }
  181. }
  182. }
  183. }
  184. if(pInfo[i][pPay] < gtm) pInfo[i][pPay] = gtm+3600, PayDay(i);
  185. if(pInfo[i][aVar][21] != 10 && pInfo[i][pGunLic] != 1 && vwp[i] == 999)
  186. {
  187. format(MSt, 29, "time remaining: ~y~%02i:%02i", (pInfo[i][aVar][21]-gtm) / 60, (pInfo[i][aVar][21]-gtm) % 60), PlayerTextDrawSetString(i, TExam[i][0], MSt);
  188. if(pInfo[i][aVar][21] < gtm) SetPlayerVirtualWorldEx(i, 0), SetPlayerInteriorEx(i, 0), SetPlayerPos(i, Business[pInfo[i][aVar][63]][EnterX], Business[pInfo[i][aVar][63]][EnterY], Business[pInfo[i][aVar][63]][EnterZ]), pInfo[i][aVar][63] = -1, PlayerTextDrawHide(i, TExam[i][0]), PlayerTextDrawHide(i, TExam[i][1]),
  189. GameTextForPlayer(i, "~n~~n~~r~weapon lesson failed~n~time out", 5000, 3), SetPlayerHealth(i, pInfo[i][pTruck]), ResetPlayerWeapons(i);
  190. }
  191. if(IsPlayerInRangeOfPoint(i, 18.0, 488.5744,-1731.4445,11.2409) || IsPlayerInRangeOfPoint(i, 35.0, 1026.1573,-1035.2090,31.5135) || IsPlayerInRangeOfPoint(i, 18.0, 2076.1414,-1831.4353,13.5545) || IsPlayerInRangeOfPoint(i, 18.0, 2394.0952,1474.4437,10.6719)
  192. || IsPlayerInRangeOfPoint(i, 18.0, 719.9330,-467.4828,16.3437) || IsPlayerInRangeOfPoint(i, 35.0, 1962.2375,2162.1414,10.8203) || IsPlayerInRangeOfPoint(i, 18.0, 1962.2375,2162.1414,10.8203) || IsPlayerInRangeOfPoint(i, 18.0, -1420.6803,2595.4841,55.7089) || IsPlayerInRangeOfPoint(i, 18.0, -100.1967,1106.9929,19.7422)) { DisableRemoteVehicleCollisions(i, 1), pInfo[i][aVar][57] = 1; }
  193. else { if(pInfo[i][aVar][57] == 1) DisableRemoteVehicleCollisions(i, pInfo[i][aVar][72] != -1 ? (1) : (0)), pInfo[i][aVar][57] = 0; }
  194. if(pInfo[i][aVar][63] != -1 && GetPlayerTargetActor(i) != 65535 && (GetPlayerWeapon(i) == 24 || GetPlayerWeapon(i) == 30 || GetPlayerWeapon(i) == 29) && !IsACop(i))
  195. {
  196. if(GetPlayerTargetActor(i) == arob1 || GetPlayerTargetActor(i) == arob2)
  197. {
  198. if(pInfo[i][pScore] < 4) { SendClientMessage(i, COLOR_DARKGRAY, "You need at least level 4."); continue; }
  199. if(pInfo[i][pWantedLevel] > 0) { SendClientMessage(i, COLOR_DARKGRAY, "You already have a wanted, you can not rob the business."); continue; }
  200. if(pInfo[i][pRob] < 10) { SendClientMessage(i, COLOR_DARKGRAY, "You don't have enough rob points. (10)"); continue; }
  201. if(CP[i] != 292) ApplyActorAnimation(GetPlayerTargetActor(i), "ROB_BANK", "SHP_HandsUp_Scr", 4.1, 0, 0, 0, 0, 0),
  202. SetPlayerCheckpoint(i, 2315.5642,-0.4943,26.7422, 2.0), CP[i] = 292, GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~w~you get the key~n~go to ~r~checkpoint~w~...", 3000, 3);
  203. }
  204. else
  205. {
  206. if(pInfo[i][pWantedLevel] > 0) { SendClientMessage(i, COLOR_DARKGRAY, "You already have a wanted, you can not rob the business."); continue; }
  207. if(pInfo[i][pRob] < 4) { SendClientMessage(i, COLOR_DARKGRAY, "You don't have enough rob points. (4)"); continue; }
  208. switch(pInfo[i][aVar][117])
  209. {
  210. case 0: pInfo[i][aVar][117] = 1, ApplyActorAnimation(GetPlayerTargetActor(i), "SHOP", "SHP_Rob_GiveCash", 4.1, 0, 0, 0, 0, 0), GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~n~~w~robbery...", 1000, 3);
  211. case 1: pInfo[i][aVar][117] = 2, ApplyActorAnimation(GetPlayerTargetActor(i), "SHOP", "SHP_Rob_GiveCash", 4.1, 0, 0, 0, 0, 0), GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~n~~w~robbery...", 1000, 3);
  212. case 2: pInfo[i][aVar][117] = 3, ApplyActorAnimation(GetPlayerTargetActor(i), "SHOP", "SHP_Rob_GiveCash", 4.1, 0, 0, 0, 0, 0), GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~n~~w~robbery...", 1000, 3);
  213. case 3: pInfo[i][aVar][117] = 4, ApplyActorAnimation(GetPlayerTargetActor(i), "SHOP", "SHP_Rob_GiveCash", 4.1, 0, 0, 0, 0, 0), GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~n~~w~robbery...", 1000, 3);
  214. case 4: pInfo[i][aVar][117] = 5, ApplyActorAnimation(GetPlayerTargetActor(i), "SHOP", "SHP_Rob_GiveCash", 4.1, 0, 0, 0, 0, 0), GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~n~~w~robbery...", 1000, 3);
  215. case 5: pInfo[i][aVar][117] = 6, ApplyActorAnimation(GetPlayerTargetActor(i), "SHOP", "SHP_Rob_GiveCash", 4.1, 0, 0, 0, 0, 0), GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~n~~w~robbery...", 1000, 3);
  216. case 6: pInfo[i][aVar][117] = 7, ApplyActorAnimation(GetPlayerTargetActor(i), "SHOP", "SHP_Rob_GiveCash", 4.1, 0, 0, 0, 0, 0), GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~n~~w~robbery...", 1000, 3);
  217. case 7: pInfo[i][aVar][117] = 8, ApplyActorAnimation(GetPlayerTargetActor(i), "SHOP", "SHP_Rob_GiveCash", 4.1, 0, 0, 0, 0, 0), GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~n~~w~robbery...", 1000, 3);
  218. case 8: pInfo[i][aVar][117] = 9, ApplyActorAnimation(GetPlayerTargetActor(i), "SHOP", "SHP_Rob_GiveCash", 4.1, 0, 0, 0, 0, 0), GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~n~~w~robbery...", 1000, 3);
  219. case 9:
  220. {
  221. SetPlayerWantedLevel(i, 6), pInfo[i][pWantedLevel] = 6, pInfo[i][pRob] -= 4, pInfo[i][pSuu] = pInfo[i][pSuu] == 1 ? (pInfo[i][pSuu] = 1) : (pInfo[i][pSuu] = 0),
  222. pInfo[i][pExpWtd] = 480, PlayerTextDrawShow(i, ExpWanted[i]), format(stmsg[i], 165, "HQ: Crime: Rob Business, +6 Wanted Level, Suspect: %s.", GetName(i)),
  223. SendTeamMessageCop(COLOR_DBLUE, stmsg[i]), SendClientMessage(i, COLOR_RED, "You commited a crime (Rob Business), Wanted Level: +6, Reporter: Unknown.");
  224. switch(pInfo[i][pRobSkill])
  225. {
  226. case 0..59: {
  227. pInfo[i][pValue] = RandomEx(35800, 36801), pInfo[i][pRobSkill]++;
  228. if(pInfo[i][pRobSkill] == 60) format(stmsg[i], 100, "* Felicitari %s, ai avansat la Rob Skill 1.", GetName(i)), SendClientMessage(i, COLOR_YELLOW, stmsg[i]); }
  229. case 60..119: {
  230. pInfo[i][pValue] = RandomEx(39900, 42801), pInfo[i][pRobSkill]++;
  231. if(pInfo[i][pRobSkill] == 120) format(stmsg[i], 100, "* Felicitari %s, ai avansat la Rob Skill 2.", GetName(i)), SendClientMessage(i, COLOR_YELLOW, stmsg[i]); }
  232. case 120..179: {
  233. pInfo[i][pValue] = RandomEx(47900, 48201), pInfo[i][pRobSkill]++;
  234. if(pInfo[i][pRobSkill] == 180) format(stmsg[i], 100, "* Felicitari %s, ai avansat la Rob Skill 3.", GetName(i)), SendClientMessage(i, COLOR_YELLOW, stmsg[i]); }
  235. case 180..239: {
  236. pInfo[i][pValue] = RandomEx(52300, 59601), pInfo[i][pRobSkill]++;
  237. if(pInfo[i][pRobSkill] == 240) format(stmsg[i], 100, "* Felicitari %s, ai avansat la Rob Skill 4.", GetName(i)), SendClientMessage(i, COLOR_YELLOW, stmsg[i]); }
  238. case 240..299: {
  239. pInfo[i][pValue] = RandomEx(62700, 68101), pInfo[i][pRobSkill]++;
  240. if(pInfo[i][pRobSkill] == 300) format(stmsg[i], 100, "* Felicitari %s, ai avansat la Rob Skill 5.", GetName(i)), SendClientMessage(i, COLOR_YELLOW, stmsg[i]); }
  241. case 300:
  242. pInfo[i][pValue] = RandomEx(72210, 76691);
  243. }
  244. format(pInfo[i][pGText], 80, "~g~~n~~n~business robbery successful~n~+%s$", FormatNumber(pInfo[i][pValue])),
  245. GameTextForPlayer(i, pInfo[i][pGText], 6000, 3), GiveMoney(i, pInfo[i][pValue]), pInfo[i][aVar][36] = 0;
  246. }
  247. default: continue;
  248. }
  249. }
  250. }
  251. if(FindP[i] > -1)
  252. {
  253. switch(pInfo[i][aVar][58])
  254. {
  255. case 1:
  256. {
  257. if(pInfo[FindP[i]][pStatus] != 1)
  258. {
  259. DisablePlayerCheckpoint(i), GameTextForPlayer(i, "~r~player has disconnected", 3000, 5),
  260. FindP[i] = -1, PlayerTextDrawHide(i, FindTD[i]);
  261. continue;
  262. }
  263. if(pInfo[FindP[i]][aVar][61] != -1 && IsPlayerInRangeOfPoint(FindP[i], 90.0, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ]))
  264. {
  265. SetPlayerCheckpoint(i, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ], 4.0), CP[i] = 0,
  266. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  267. continue;
  268. }
  269. if(pInfo[FindP[i]][aVar][63] != -1)
  270. {
  271. SetPlayerCheckpoint(i, Business[pInfo[FindP[i]][aVar][63]][EnterX], Business[pInfo[FindP[i]][aVar][63]][EnterY], Business[pInfo[FindP[i]][aVar][63]][EnterZ], 4.0), CP[i] = 0,
  272. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, Business[pInfo[FindP[i]][aVar][63]][EnterX], Business[pInfo[FindP[i]][aVar][63]][EnterY], Business[pInfo[FindP[i]][aVar][63]][EnterZ])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  273. continue;
  274. }
  275. if(pInfo[FindP[i]][aVar][120] > 0 && (innt[FindP[i]] > 0 || vwp[FindP[i]] > 0))
  276. {
  277. SetPlayerCheckpoint(i, FIP[pInfo[FindP[i]][aVar][120]-1][0], FIP[pInfo[FindP[i]][aVar][120]-1][1], FIP[pInfo[FindP[i]][aVar][120]-1][2], 4.0), CP[i] = 0,
  278. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, FIP[pInfo[FindP[i]][aVar][120]-1][0], FIP[pInfo[FindP[i]][aVar][120]-1][1], FIP[pInfo[FindP[i]][aVar][120]-1][2])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  279. continue;
  280. }
  281.  
  282. GetPlayerPos(FindP[i], xx, yy, zz), SetPlayerCheckpoint(i, xx, yy, zz, 4.0), CP[i] = 0;
  283. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, xx, yy, zz));
  284. PlayerTextDrawSetString(i, FindTD[i], MSt);
  285. }
  286. case 2:
  287. {
  288. if(pInfo[FindP[i]][pStatus] != 1)
  289. {
  290. SendClientMessage(i, COLOR_TAXI, "Jucatorul sa deconectat de pe server!"), DisablePlayerCheckpoint(i),
  291. FindP[i] = -1, PlayerTextDrawHide(i, FindTD[i]), pInfo[i][aVar][89] = -1;
  292. continue;
  293. }
  294. if(pInfo[FindP[i]][aVar][32] == 0)
  295. {
  296. SendClientMessage(i, COLOR_TAXI, "Jucatorul a anulat serviciul de taxi."),
  297. DisablePlayerCheckpoint(i), FindP[i] = -1, PlayerTextDrawHide(i, FindTD[i]), pInfo[i][aVar][89] = -1;
  298. continue;
  299. }
  300. if(pInfo[FindP[i]][aVar][61] != -1 && IsPlayerInRangeOfPoint(FindP[i], 90.0, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ]))
  301. {
  302. SetPlayerCheckpoint(i, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ], 4.0), CP[i] = 76,
  303. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  304. continue;
  305. }
  306. if(pInfo[FindP[i]][aVar][63] != -1)
  307. {
  308. SetPlayerCheckpoint(i, Business[pInfo[FindP[i]][aVar][63]][EnterX], Business[pInfo[FindP[i]][aVar][63]][EnterY], Business[pInfo[FindP[i]][aVar][63]][EnterZ], 4.0), CP[i] = 0,
  309. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, Business[pInfo[FindP[i]][aVar][63]][EnterX], Business[pInfo[FindP[i]][aVar][63]][EnterY], Business[pInfo[FindP[i]][aVar][63]][EnterZ])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  310. continue;
  311. }
  312. if(pInfo[FindP[i]][aVar][120] > 0 && (innt[FindP[i]] > 0 || vwp[FindP[i]] > 0))
  313. {
  314. SetPlayerCheckpoint(i, FIP[pInfo[FindP[i]][aVar][120]-1][0], FIP[pInfo[FindP[i]][aVar][120]-1][1], FIP[pInfo[FindP[i]][aVar][120]-1][2], 4.0), CP[i] = 76,
  315. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, FIP[pInfo[FindP[i]][aVar][120]-1][0], FIP[pInfo[FindP[i]][aVar][120]-1][1], FIP[pInfo[FindP[i]][aVar][120]-1][2])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  316. continue;
  317. }
  318.  
  319. GetPlayerPos(FindP[i], xx, yy, zz), SetPlayerCheckpoint(i, xx, yy, zz, 4.0), CP[i] = 76;
  320. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, xx, yy, zz));
  321. PlayerTextDrawSetString(i, FindTD[i], MSt);
  322. }
  323. case 3:
  324. {
  325. if(pInfo[FindP[i]][pStatus] != 1)
  326. {
  327. SendClientMessage(i, COLOR_PARAMEDICS, "Jucatorul sa deconectat de pe server!"), DisablePlayerCheckpoint(i),
  328. FindP[i] = -1, PlayerTextDrawHide(i, FindTD[i]), pInfo[i][aVar][89] = -1;
  329. continue;
  330. }
  331. if(pInfo[FindP[i]][aVar][31] == 0)
  332. {
  333. SendClientMessage(i, COLOR_PARAMEDICS, "Jucatorul a anulat serviciul de paramedici."), DisablePlayerCheckpoint(i),
  334. FindP[i] = -1, PlayerTextDrawHide(i, FindTD[i]), pInfo[i][aVar][89] = -1;
  335. continue;
  336. }
  337. if(pInfo[FindP[i]][aVar][61] != -1 && IsPlayerInRangeOfPoint(FindP[i], 90.0, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ]))
  338. {
  339. SetPlayerCheckpoint(i, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ], 4.0), CP[i] = 77,
  340. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  341. continue;
  342. }
  343. if(pInfo[FindP[i]][aVar][63] != -1)
  344. {
  345. SetPlayerCheckpoint(i, Business[pInfo[FindP[i]][aVar][63]][EnterX], Business[pInfo[FindP[i]][aVar][63]][EnterY], Business[pInfo[FindP[i]][aVar][63]][EnterZ], 4.0), CP[i] = 0,
  346. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, Business[pInfo[FindP[i]][aVar][63]][EnterX], Business[pInfo[FindP[i]][aVar][63]][EnterY], Business[pInfo[FindP[i]][aVar][63]][EnterZ])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  347. continue;
  348. }
  349. if(pInfo[FindP[i]][aVar][120] > 0 && (innt[FindP[i]] > 0 || vwp[FindP[i]] > 0))
  350. {
  351. SetPlayerCheckpoint(i, FIP[pInfo[FindP[i]][aVar][120]-1][0], FIP[pInfo[FindP[i]][aVar][120]-1][1], FIP[pInfo[FindP[i]][aVar][120]-1][2], 4.0), CP[i] = 77,
  352. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, FIP[pInfo[FindP[i]][aVar][120]-1][0], FIP[pInfo[FindP[i]][aVar][120]-1][1], FIP[pInfo[FindP[i]][aVar][120]-1][2])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  353. continue;
  354. }
  355.  
  356. GetPlayerPos(FindP[i], xx, yy, zz), SetPlayerCheckpoint(i, xx, yy, zz, 4.0), CP[i] = 77;
  357. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, xx, yy, zz));
  358. PlayerTextDrawSetString(i, FindTD[i], MSt);
  359. }
  360. case 4:
  361. {
  362. if(pInfo[FindP[i]][pStatus] != 1)
  363. {
  364. SendClientMessage(i, COLOR_SCINSTRUCTOR, "Jucatorul sa deconectat de pe server!"), DisablePlayerCheckpoint(i),
  365. FindP[i] = -1, PlayerTextDrawHide(i, FindTD[i]), pInfo[i][aVar][89] = -1;
  366. continue;
  367. }
  368. if(pInfo[FindP[i]][aVar][77] == 0)
  369. {
  370. SendClientMessage(i, COLOR_SCINSTRUCTOR, "Jucatorul a anulat cererea de licente."), DisablePlayerCheckpoint(i),
  371. FindP[i] = -1, PlayerTextDrawHide(i, FindTD[i]), pInfo[i][aVar][89] = -1;
  372. continue;
  373. }
  374. if(pInfo[FindP[i]][aVar][61] != -1 && IsPlayerInRangeOfPoint(FindP[i], 90.0, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ]))
  375. {
  376. SetPlayerCheckpoint(i, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ], 4.0), CP[i] = 3,
  377. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  378. continue;
  379. }
  380. if(pInfo[FindP[i]][aVar][63] != -1)
  381. {
  382. SetPlayerCheckpoint(i, Business[pInfo[FindP[i]][aVar][63]][EnterX], Business[pInfo[FindP[i]][aVar][63]][EnterY], Business[pInfo[FindP[i]][aVar][63]][EnterZ], 4.0), CP[i] = 0,
  383. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, Business[pInfo[FindP[i]][aVar][63]][EnterX], Business[pInfo[FindP[i]][aVar][63]][EnterY], Business[pInfo[FindP[i]][aVar][63]][EnterZ])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  384. continue;
  385. }
  386. if(pInfo[FindP[i]][aVar][120] > 0 && (innt[FindP[i]] > 0 || vwp[FindP[i]] > 0))
  387. {
  388. SetPlayerCheckpoint(i, FIP[pInfo[FindP[i]][aVar][120]-1][0], FIP[pInfo[FindP[i]][aVar][120]-1][1], FIP[pInfo[FindP[i]][aVar][120]-1][2], 4.0), CP[i] = 3,
  389. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, FIP[pInfo[FindP[i]][aVar][120]-1][0], FIP[pInfo[FindP[i]][aVar][120]-1][1], FIP[pInfo[FindP[i]][aVar][120]-1][2])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  390. continue;
  391. }
  392.  
  393. GetPlayerPos(FindP[i], xx, yy, zz), SetPlayerCheckpoint(i, xx, yy, zz, 4.0), CP[i] = 3;
  394. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, xx, yy, zz));
  395. PlayerTextDrawSetString(i, FindTD[i], MSt);
  396. }
  397. case 5:
  398. {
  399. if(pInfo[FindP[i]][pStatus] != 1)
  400. {
  401. SendClientMessage(i, COLOR_SCINSTRUCTOR, "Jucatorul sa deconectat de pe server!"), DisablePlayerCheckpoint(i),
  402. FindP[i] = -1, PlayerTextDrawHide(i, FindTD[i]), pInfo[i][aVar][89] = -1;
  403. continue;
  404. }
  405. if(pInfo[FindP[i]][aVar][99] == 0)
  406. {
  407. SendClientMessage(i, COLOR_SCINSTRUCTOR, "Jucatorul a anulat apelul catre serviciul de mecanici."), DisablePlayerCheckpoint(i),
  408. FindP[i] = -1, PlayerTextDrawHide(i, FindTD[i]), pInfo[i][aVar][89] = -1;
  409. continue;
  410. }
  411. if(pInfo[FindP[i]][aVar][61] != -1 && IsPlayerInRangeOfPoint(FindP[i], 90.0, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ]))
  412. {
  413. SetPlayerCheckpoint(i, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ], 4.0), CP[i] = 183,
  414. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  415. continue;
  416. }
  417. if(pInfo[FindP[i]][aVar][63] != -1)
  418. {
  419. SetPlayerCheckpoint(i, Business[pInfo[FindP[i]][aVar][63]][EnterX], Business[pInfo[FindP[i]][aVar][63]][EnterY], Business[pInfo[FindP[i]][aVar][63]][EnterZ], 4.0), CP[i] = 0,
  420. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, Business[pInfo[FindP[i]][aVar][63]][EnterX], Business[pInfo[FindP[i]][aVar][63]][EnterY], Business[pInfo[FindP[i]][aVar][63]][EnterZ])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  421. continue;
  422. }
  423. if(pInfo[FindP[i]][aVar][120] > 0 && (innt[FindP[i]] > 0 || vwp[FindP[i]] > 0))
  424. {
  425. SetPlayerCheckpoint(i, FIP[pInfo[FindP[i]][aVar][120]-1][0], FIP[pInfo[FindP[i]][aVar][120]-1][1], FIP[pInfo[FindP[i]][aVar][120]-1][2], 4.0), CP[i] = 183,
  426. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, FIP[pInfo[FindP[i]][aVar][120]-1][0], FIP[pInfo[FindP[i]][aVar][120]-1][1], FIP[pInfo[FindP[i]][aVar][120]-1][2])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  427. continue;
  428. }
  429.  
  430. GetPlayerPos(FindP[i], xx, yy, zz), SetPlayerCheckpoint(i, xx, yy, zz, 4.0), CP[i] = 183;
  431. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, xx, yy, zz));
  432. PlayerTextDrawSetString(i, FindTD[i], MSt);
  433. }
  434. case 6:
  435. {
  436. if(pInfo[FindP[i]][pStatus] != 1)
  437. {
  438. DisablePlayerCheckpoint(i), GameTextForPlayer(i, "~r~player has disconnected", 3000, 5),
  439. FindP[i] = -1, PlayerTextDrawHide(i, FindTD[i]), pInfo[i][aVar][89] = -1;
  440. continue;
  441. }
  442. if(pInfo[FindP[i]][aVar][61] != -1 && IsPlayerInRangeOfPoint(FindP[i], 90.0, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ]))
  443. {
  444. SetPlayerCheckpoint(i, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ], 4.0), CP[i] = 0,
  445. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, Houses[pInfo[FindP[i]][aVar][61]][EnterX], Houses[pInfo[FindP[i]][aVar][61]][EnterY], Houses[pInfo[FindP[i]][aVar][61]][EnterZ])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  446. continue;
  447. }
  448. if(pInfo[FindP[i]][aVar][63] != -1)
  449. {
  450. SetPlayerCheckpoint(i, Business[pInfo[FindP[i]][aVar][63]][EnterX], Business[pInfo[FindP[i]][aVar][63]][EnterY], Business[pInfo[FindP[i]][aVar][63]][EnterZ], 4.0), CP[i] = 0,
  451. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, Business[pInfo[FindP[i]][aVar][63]][EnterX], Business[pInfo[FindP[i]][aVar][63]][EnterY], Business[pInfo[FindP[i]][aVar][63]][EnterZ])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  452. continue;
  453. }
  454. if(pInfo[FindP[i]][aVar][120] > 0 && (innt[FindP[i]] > 0 || vwp[FindP[i]] > 0))
  455. {
  456. SetPlayerCheckpoint(i, FIP[pInfo[FindP[i]][aVar][120]-1][0], FIP[pInfo[FindP[i]][aVar][120]-1][1], FIP[pInfo[FindP[i]][aVar][120]-1][2], 4.0), CP[i] = 0,
  457. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, FIP[pInfo[FindP[i]][aVar][120]-1][0], FIP[pInfo[FindP[i]][aVar][120]-1][1], FIP[pInfo[FindP[i]][aVar][120]-1][2])), PlayerTextDrawSetString(i, FindTD[i], MSt);
  458. continue;
  459. }
  460.  
  461. GetPlayerPos(FindP[i], xx, yy, zz), SetPlayerCheckpoint(i, xx, yy, zz, 4.0), CP[i] = 0;
  462. format(MSt, sizeof(MSt), "Distance to %s: ~y~%0.1fm", GetName(FindP[i]), GetPlayerDistanceFromPoint(i, xx, yy, zz));
  463. PlayerTextDrawSetString(i, FindTD[i], MSt);
  464. }
  465. default: continue;
  466. }
  467. }
  468. }
  469. gtm = gettime(TTxt[0],TTxt[1]), TextDrawSetString(WStar, ws), format(MSt, 6, "%02d:%02d", TTxt[0], TTxt[1]), TextDrawSetString(Time, MSt);
  470. if(WarOnOff > 0)
  471. {
  472. format(MSt, 30, "War Time: ~p~%02i:%02i", (WarOnOff-gtm)/60, (WarOnOff-gtm)%60), TextDrawSetString(WarTD[0], MSt);
  473. if(WarOnOff < gtm) StopWar();
  474. }
  475. if(War2OnOff > 0)
  476. {
  477. format(MSt, 30, "War Time: ~p~%02i:%02i", (War2OnOff-gtm)/60, (War2OnOff-gtm)%60), TextDrawSetString(War2TD[0], MSt);
  478. if(War2OnOff < gtm) StopWar2();
  479. }
  480. if(PST != 0 && PST < gtm) StopPaint();
  481. if(PST > gtm) format(MSt, sizeof(MSt), "Time %02i:%02i", (PST-gtm)/60, (PST-gtm)%60), TextDrawSetString(PT[0], MSt);
  482. if(gas < gtm)
  483. {
  484. if(TTxt[0] != ghour)
  485. {
  486. ghour = TTxt[0], SetWorldTime(TTxt[0]+2), getdate(DTxt[0], DTxt[1], DTxt[2]), format(MSt, sizeof(MSt), "%02d.%02d.%d", DTxt[2], DTxt[1], DTxt[0]), TextDrawSetString(Date, MSt);
  487. if(ghour == 0)
  488. {
  489. mysql_format(MySQLCon, quMYSQL, 150, "INSERT INTO `inf_record` (`record_date`,`record_players`) VALUES ('%02d-%02d-%d', %d)", DTxt[2], DTxt[1], DTxt[0], Iter_Count(Player));
  490. mysql_tquery(MySQLCon, quMYSQL);
  491. infRecord = Iter_Count(Player);
  492. }
  493. }
  494. for(new c = 1, j = GetVehiclePoolSize(); c <= j; c++) if(IsValidVehicle(c) && !IsABike(c))
  495. {
  496. GetVehicleParamsEx(c,vParams[0],vParams[1],vParams[2],vParams[3],vParams[4],vParams[5],vParams[6]);
  497. if(vParams[0] == 1) vVar[3][c]--, SetVehicleParamsExx(c,vVar[3][c] < 1 && vParams[0] == 1 ? (0) : (vParams[0]),vParams[1],vParams[2],vParams[3],vParams[4],vParams[5],vParams[6]);
  498. }
  499. gas = gtm+40;
  500. }
  501. if(HR_Time > 0)
  502. {
  503. HR_Time--;
  504. format(MSt, 50, "Next race starts in: ~y~%02d:%02d", HR_Time/60, HR_Time%60), TextDrawSetString(HorseRaces[17], MSt);
  505. if(!HR_Time) for(new q = 0; q < sizeof(HorseRaces); q++) TextDrawHideForAll(HorseRaces[q]);
  506. }
  507. else if(!HR_Time && !HR_Stop && !HR_Again)
  508. {
  509. if(!HR_Prepare)
  510. {
  511. foreach(new e : HorseP) if(pInfo[e][pBetting] == 1) TextDrawShowForPlayer(e, HorseTimeLeft);
  512. HR_Prepare = true;
  513. }
  514. }
  515. if(HR_Prepare)
  516. {
  517. TextDrawSetString(HorseTimeLeft, sprintf("%d", 10 - HR_Counter)), HR_Counter++;
  518. if(HR_Counter == 11)
  519. {
  520. HR_Counter = 0, HR_Stop = true, HR_Prepare = false;
  521. foreach(new z : HorseP) if(pInfo[z][pBetting] == 1) TextDrawHideForPlayer(z, HorseTimeLeft);
  522. }
  523. }
  524. if(HR_Stop && !HR_Win) SetHorseRaces(), HR_Win = true, HR_ClasamentShow = true;
  525. else if(HR_Stop && HR_Win)
  526. {
  527. foreach(new c : HorseP) if(pInfo[c][pBetting] == 1) for(new j = 0; j < sizeof(HorseWinner); j++) TextDrawShowForPlayer(c, HorseWinner[j]);
  528. if(!HR_Tested) SetTimer("HR_ResetVariables", 500, false), HR_Tested = true;
  529. }
  530.  
  531. return 1;
  532. }
Add Comment
Please, Sign In to add comment