hopingsteam

Untitled

Jun 25th, 2018
160
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. task speedtimer[1000]()
  2. {
  3. foreach(new i: DriverIter)
  4. {
  5. new string[128], Float:health;
  6. new veh = GetPlayerVehicleID(i);
  7. new speed=GetPlayerSpeed(i);
  8. new carid = FindSpawnID(veh);
  9. format(string,sizeof(string),"%d", speed);
  10. PlayerTextDrawSetString(i, speedom[i], string);
  11. GetVehicleHealth(veh, health);
  12. format(string,sizeof(string),"HEALTH: ~w~ %.2f", health);
  13. PlayerTextDrawSetString(i, damagetd[i], string);
  14. if(CarInfo[carid][cID] != -2 && carid != 0)
  15. {
  16. CarInfo[carid][cKM] += (speed*0.27)/100;
  17. //CarInfo[carid][cKM] += (speed*5)/18;
  18. format(string,sizeof(string),"%.2f KM", CarInfo[carid][cKM]);
  19. PlayerTextDrawSetString(i, kilometraj[i], string);
  20. }
  21. if(!IsAPlane(veh))
  22. {
  23. new speed2 = GetPlayerSpeed2(i,0);
  24. if(speed2 > 300)// && !IsPlayerInArea(i,-3000,-2197.265625,-1886.71875,-849.609375))
  25. {
  26. SpeedHackWarn[i]++;
  27. if(SpeedHackWarn[i] == 3)
  28. {
  29. va_SendClientMessageToAll(COLOR_LIGHTRED, ""#SERVER_NAME": %s a primit kick de la AdmBot, motiv: SpeedHack", PlayerInfo[i][pServerName]);
  30. defer KickTimer(i);
  31. }
  32. else
  33. {
  34. format(string, 256, "Anti-Cheat:{FFFFFF} %s(%d, level %d) este suspect de Speed Hack | Speed %.0d km/h, Vehicle %s", PlayerInfo[i][pServerName],i,PlayerInfo[i][pLevel],speed2,aVehicleNames[GetVehicleModel(GetPlayerVehicleID(i))-400]);
  35. ABroadCast(0xC40B0BFF,string,1);
  36. }
  37. }
  38. }
  39. if(IsABoat(veh))
  40. {
  41. if(PlayerInfo[i][pBoatLic] < 1)
  42. {
  43. RemovePlayerFromVehicleEx(i);
  44. }
  45. }
  46. else if(IsAPlane(veh))
  47. {
  48. if(PlayerInfo[i][pFlyLic] < 1)
  49. {
  50. RemovePlayerFromVehicleEx(i);
  51. }
  52. }
  53. else
  54. {
  55. if(PlayerInfo[i][pCarLic] != 1)
  56. {
  57. if(IsABike(veh)) { }
  58. else { RemovePlayerFromVehicleEx(i); }
  59. }
  60. }
  61. }/*
  62. foreach(new i: Player)
  63. {
  64. if(IsAtBornToRaceEvent[i] == 1)
  65. {
  66. if (IsPlayerInAnyVehicle(i))
  67. {
  68. new veh = GetPlayerVehicleID(i), Float:health;
  69. GetVehicleHealth(veh, health);
  70. Gas[GetPlayerVehicleID(i)]=1000;
  71. GetVehicleHealth(veh, health);
  72. if(health < 250)
  73. {
  74. SetVehicleHealth(veh, 1000);
  75. RepairVehicle(GetPlayerVehicleID(i));
  76. SendClientMessage(i,COLOR_LIGHTBLUE, "Fast And Furios:"#COL_EASY" Masina reparata!");
  77. }
  78. }
  79. }
  80. } */
  81. return 1;
  82. }
  83.  
  84.  
  85. task OtherTimer[1000]()
  86. {
  87. AdminsOnline();
  88. GetMoney();
  89. foreach(new i: KickPPlayer)
  90. {
  91. if(KickP[i] < 1)
  92. {
  93. CheckJetpack(i);
  94. AntiHA(i);
  95. AntiSpeed(i);
  96. }
  97. if(SpeedWarning[i] > 0) SpeedWarning[i]--;
  98. if(SpeedWarning[i] == 0)
  99. {
  100. SpeedWarning[i] = -1;
  101. }
  102. }
  103. foreach(new i: HelpMesendPlayer) {
  104. if(helpmesend[i] > 0) helpmesend[i]--;
  105. if(helpmesend[i] == 1)
  106. {
  107. helps--;
  108. helpmesend[i] = -1;
  109. DeletePVar(i, "Help");
  110. }
  111. }
  112. foreach(new i: FlyAdmin) {
  113. if(fly[i] == 1)
  114. {
  115. SetPlayerHealthEx(i, 500000.0);
  116. SetPlayerArmourEx(i, 999999);
  117. }
  118. }
  119. foreach(new i: Admins) {
  120. if(PlayerInfo[i][pAdmin] >= 1338 && OwnerInfo[i] == 1) {
  121. new string[128];
  122. format(string, sizeof(string), "~r~~n~~n~%d~w~~n~TICK~g~~n~~n~%d~w~~n~ANIM~n~~n~~y~%d~w~~n~FPS~n~~n~~b~%d~w~~n~QUERIES", GetServerTickRate(), GetPlayerAnimationIndex(i), FPS2[i]-1, mysql_unprocessed_queries());
  123. PlayerTextDrawSetString(i, InfoTD, string);
  124. PlayerTextDrawShow(i, InfoTD);
  125. }
  126. else PlayerTextDrawHide(i, InfoTD);
  127. }
  128. foreach(new i: Player) {
  129. if(PlayerInfo[i][pLocal] != DEFAULT_VAR && PlayerInfo[i][pInt] != 0)
  130. {
  131. new Float:oldposx, Float:oldposy, Float:oldposz;
  132. GetPlayerPos(i, oldposx, oldposy, oldposz);
  133. if(oldposz != 0.0)
  134. {
  135. if(oldposz < 600.0)
  136. {
  137. if(PlayerInfo[i][pLocal] == LOCAL_CITYHALL)//City Hall
  138. {
  139. SetPlayerInterior(i,0);
  140. SetPlayerPos(i,1480.9103,-1770.3743,18.7958);
  141. PlayerInfo[i][pInt] = 0;
  142. PlayerInfo[i][pLocal] = DEFAULT_VAR;
  143. }
  144. if(PlayerInfo[i][pLocal] >= 10001 && PlayerInfo[i][pLocal] <= 10000 + MAX_BIZ)
  145. {
  146. SetPlayerPos(i, BizzInfo[PlayerInfo[i][pLocal]-10000][bEntranceX], BizzInfo[PlayerInfo[i][pLocal]-10000][bEntranceY],BizzInfo[PlayerInfo[i][pLocal]-10000][bEntranceZ]); // Warp the player
  147. PlayerInfo[i][pLocal] = DEFAULT_VAR;
  148. SetPlayerInterior(i,0);
  149. PlayerInfo[i][pInt] = 0;
  150. }
  151. else if(PlayerInfo[i][pLocal] <= MAX_HOUSES)
  152. {
  153. SetPlayerPos(i, HouseInfo[PlayerInfo[i][pLocal]][hEntrancex], HouseInfo[PlayerInfo[i][pLocal]][hEntrancey],HouseInfo[PlayerInfo[i][pLocal]][hEntrancez]); // Warp the player
  154. PlayerInfo[i][pLocal] = DEFAULT_VAR;
  155. SetPlayerInterior(i,0);
  156. PlayerInfo[i][pInt] = 0;
  157. SetPlayerVirtualWorld(i,0);
  158. PlayerInfo[i][pVirWorld] = 0;
  159. }
  160. }
  161. }
  162. }
  163. if(CellTime[i] > 0)
  164. {
  165. if (CellTime[i] == cchargetime)
  166. {
  167. CellTime[i] = 1;
  168. if(Mobile[Mobile[i]] == i)
  169. {
  170. CallCost[i] = CallCost[i]+callcost;
  171. }
  172. }
  173. CellTime[i] = CellTime[i] +1;
  174. if (Mobile[Mobile[i]] == DEFAULT_VAR && CellTime[i] == 5)
  175. {
  176. if(IsPlayerConnected(Mobile[i]))
  177. {
  178. new string[46];
  179. format(string, sizeof(string), "* %s telefonul suna.", PlayerInfo[Mobile[i]][pServerName]);
  180. RingTone[Mobile[i]] = 10;
  181. ProxDetector(30.0, Mobile[i], string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  182. }
  183. }
  184. }
  185. if(CellTime[i] == 0 && CallCost[i] > 0)
  186. {
  187. new string[35];
  188. format(string, sizeof(string), "~w~Costul apelului~n~~r~%s$",FormatNumber(CallCost[i]));
  189. GivePlayerCash(i, -CallCost[i]);
  190. Update(i, pCashx);
  191. BizzInfo[BIZ_PHONECOMPANY][bTill] += CallCost[i];
  192. ExtortionBiz(BIZ_PHONECOMPANY, CallCost[i]);
  193. GameTextForPlayer(i, string, 5000, 1);
  194. CallCost[i] = 0;
  195. }
  196. if(TransportTime[i] > 0)
  197. {
  198. TransportTime[i] += 1;
  199. if(TransportTime[i] >= 16)
  200. {
  201. new string[60];
  202. format(string, sizeof(string), "~r~Costul Calatoriei ~w~: ~g~$$%s",FormatNumber(TransportCost[i]));
  203. GameTextForPlayer(i, string, 1500, 4);
  204. TransportTime[i] = 1;
  205. if(TransportDriver[i] < DEFAULT_VAR)
  206. {
  207. if(IsPlayerConnected(TransportDriver[i]))
  208. {
  209. TransportCost[i] += TransportValue[TransportDriver[i]];
  210. TransportCost[TransportDriver[i]] = TransportCost[i];
  211. if(GetPlayerCash(i) < TransportCost[i])
  212. {
  213. RemovePlayerFromVehicle(i);
  214. SendClientMessage(TransportDriver[i],0xD8C169FF,"Clientul a coborat din masina deoarece nu avea bani.");
  215. }
  216. }
  217. }
  218. else if(TransportDriver[i] == 1001)
  219. {
  220. TransportCost[i] += TransportValue[i];
  221. }
  222. }
  223. }
  224. if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  225. {
  226. for(new s = 0; s < sizeof(SpikeInfo); s++)
  227. {
  228. if(IsPlayerInRangeOfPoint(s, 3.3, SpikeInfo[s][sX], SpikeInfo[s][sY], SpikeInfo[s][sZ]-1.5))
  229. {
  230. if(SpikeInfo[s][sCreated] == 1)
  231. {
  232. new panels, doors, lights, tires;
  233. new carid = GetPlayerVehicleID(i);
  234. GetVehicleDamageStatus(carid, panels, doors, lights, tires);
  235. tires = encode_tires(1, 1, 1, 1);
  236. UpdateVehicleDamageStatus(carid, panels, doors, lights, tires);
  237. return 0;
  238. }
  239. }
  240. }
  241. }
  242. if(PlayerToPoint(50.0, i, -2317.8091, -1637.5575, 483.7031)) {
  243. for(new m; m < 3; m++) {
  244. if(PlayerInfo[i][pDailyMission][m] == 8) CheckMission(i, m);
  245. }
  246. }
  247. if(PlayerToPoint(50.0, i, 1962.4126,-2193.3279,13.5469)) {
  248. for(new m; m < 3; m++) {
  249. if(PlayerInfo[i][pDailyMission][m] == 9) CheckMission(i, m);
  250. }
  251. }
  252. if(PlayerToPoint(100.0, i, 1338.6273,2153.1045,11.0578)) {
  253. for(new m; m < 3; m++) {
  254. if(PlayerInfo[i][pDailyMission][m] == 10) CheckMission(i, m);
  255. }
  256. }
  257. }
  258. return 1;
  259. }
  260.  
  261. task CarCheck[30000]() {
  262. foreach(new j: Player) {
  263. SetVehicleParamsForPlayer(99, j, 0, 0);
  264. SetVehicleParamsForPlayer(100, j, 0, 0);
  265. SetVehicleParamsForPlayer(101, j, 0, 0);
  266. SetVehicleParamsForPlayer(102, j, 0, 0);
  267. SetVehicleParamsForPlayer(103, j, 0, 0);
  268. SetVehicleParamsForPlayer(104, j, 0, 0);
  269. SetVehicleParamsForPlayer(105, j, 0, 0);
  270. SetVehicleParamsForPlayer(106, j, 0, 0);
  271. SetVehicleParamsForPlayer(107, j, 0, 0);
  272. SetVehicleParamsForPlayer(108, j, 0, 0);
  273. SetVehicleParamsForPlayer(109, j, 0, 0);
  274. new Float:health;
  275. GetPlayerHealth(j, health);
  276. SetPlayerHealthEx(j, health - 1.0);
  277. switch(STDPlayer[j]) {
  278. case 1: {
  279. GetPlayerHealth(j, health);
  280. SetPlayerHealthEx(j, health - 5.0);
  281. SendClientMessage(j, COLOR_LIGHTBLUE, "* Ai pierdut 4 sanatate din cauza STD.");
  282. }
  283. case 2: {
  284. GetPlayerHealth(j, health);
  285. SetPlayerHealthEx(j, health - 12.0);
  286. SendClientMessage(j, COLOR_LIGHTBLUE, "* Ai pierdut 8 sanatate din cauza STD.");
  287. }
  288. case 3: {
  289. GetPlayerHealth(j, health);
  290. SetPlayerHealthEx(j, health - 20.0);
  291. SendClientMessage(j, COLOR_LIGHTBLUE, "* Ai pierdut 12 sanatate din cauza STD.");
  292. }
  293. }
  294. }
  295. for(new c = 1; c < 254; c++) {
  296. foreach(new i: CarJackerJob) {
  297. if (PlayerInfo[i][pJob] == 5) SetVehicleParamsForPlayer(c, i, 0, 0);
  298. }
  299. if (gLastDriver[c] == 301) CarRespawn(c);
  300. if (gLastDriver[c] >= 300) gLastDriver[c]++;
  301. }
  302. return 1;
  303. }
  304.  
  305. task CustomPickups[1000]()
  306. {
  307. foreach(new i: Player)
  308. {
  309. new Float:oldposx, Float:oldposy, Float:oldposz;
  310. GetPlayerPos(i, oldposx, oldposy, oldposz);
  311. new tmpcar = GetPlayerVehicleID(i);
  312. if(oldposx!=0.0 && oldposy!=0.0 && oldposz!=0.0)
  313. {
  314. for(new h=1;h<=MAX_BIZ;h++)
  315. {
  316. if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))
  317. {
  318. new string[128];
  319. format(string, sizeof(string), "~w~%s~n~~r~Products Required~w~: %d~n~~y~Price per product: ~w~: %s$~n~~g~Funds: ~w~: $%d",BizzInfo[h][bMessage],(BizzInfo[h][bMaxProducts]-BizzInfo[h][bProducts]),FormatNumber(BizzInfo[h][bPriceProd]),BizzInfo[h][bTill]);
  320. GameTextForPlayer(i, string, 5000, 3);
  321. return 1;
  322. }
  323. }
  324. }//custompickups end
  325. if (PlayerToPoint(2.0, i, 1173.2563,-1323.3102,15.3943))
  326. {// Hospital near Ammu
  327. GameTextForPlayer(i, "~w~Type /healme to cure yourself", 5000, 5);
  328. }
  329. else if (PlayerToPoint(2.0, i, 2029.5945,-1404.6426,17.2512))
  330. {// Hospital near speedway
  331. GameTextForPlayer(i, "~w~Type /healme to cure yourself", 5000, 5);
  332. }
  333. else if (PlayerToPoint(3, i,1480.9103,-1770.3743,18.7958))
  334. {
  335. GameTextForPlayer(i, "~y~Welcome to the ~r~City Hall~n~~w~Type /enter to go in", 5000, 5);
  336. }
  337. else if (GetPlayerState(i) == 1 && PlayerToPoint(1.0, i,242.7591,66.4315,1003.6406))
  338. {
  339. if(PlayerInfo[i][pLeader] == 1 || PlayerInfo[i][pLeader] == 2 || PlayerInfo[i][pLeader] == 3 || PlayerInfo[i][pMember] == 1 || PlayerInfo[i][pMember] == 2 || PlayerInfo[i][pMember] == 3)
  340. {
  341. GameTextForPlayer(i, "~g~Police Department elevator~n~~w~Type ~r~/pdup ~w~to go up~n~Type ~r~/pddown ~w~to go down", 5000, 3);
  342. }
  343. else
  344. {
  345. GameTextForPlayer(i, "~r~Staff only!", 5000, 3);
  346. }
  347. }
  348. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1110.9738,-305.4099,73.9922))
  349. {
  350. GameTextForPlayer(i, "~g~Hitman Undercover Place,~n~~y~Use /disguise", 5000, 3);
  351. }
  352. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,2752.7515,-1962.4762,13.5469))
  353. {
  354. GameTextForPlayer(i, "~g~LSV Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
  355. }
  356. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,690.5870,-1275.9880,13.5600))
  357. {
  358. GameTextForPlayer(i, "~g~VLA Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
  359. }
  360. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,2146.2664,-1470.3286,25.7121))
  361. {
  362. GameTextForPlayer(i, "~g~Ballas Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
  363. }
  364. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,2498.6650,-1687.3389,13.5035))
  365. {
  366. GameTextForPlayer(i, "~g~Grove Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
  367. }
  368. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1107.4956,-315.6171,74.7422))
  369. {
  370. GameTextForPlayer(i, "~g~Hitman Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
  371. }
  372. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1308.5664,-47.2725,1001.0313))
  373. {
  374. GameTextForPlayer(i, "~g~Russian Mafia Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
  375. }
  376. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,2561.5168,-1305.3997,1060.9844))
  377. {
  378. GameTextForPlayer(i, "~g~Yakuza Training Place,~n~~y~Use /enter ~n~~w~Use /exittraining to exit", 5000, 3);
  379. }
  380. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,-2651.3530,638.9305,14.4531))
  381. {
  382. GameTextForPlayer(i, "~g~Medic HQ,~n~~y~Use /enter", 5000, 3);
  383. }
  384. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,-2060.3362,469.6569,35.1723))
  385. {
  386. GameTextForPlayer(i, "~g~News HQ,~n~~y~Use /enter", 5000, 3);
  387. }
  388. else if (PlayerToPoint(2.0, i, 694.7092,-455.9879,16.3359))
  389. {
  390. GameTextForPlayer(i, "~r~Materials Shop~n~~w~To sell type /sellmats~n~To buy type /buymats", 5000, 3);
  391. }
  392. else if (GetPlayerState(i) == 1 && PlayerToPoint(2.0, i,1381.0413,-1088.8511,27.3906) || PlayerToPoint(2.0, i,-1963.6067,437.5748,35.1719))
  393. {
  394. GameTextForPlayer(i, "~g~Welcome,~n~~y~Use /mission to take on a Mission", 5000, 3);
  395. }
  396. else if (PlayerToPoint(3, i,2027.5966,1008.9321,10.8203) || PlayerToPoint(3, i,-2190.7061,641.7987,49.4375) || PlayerToPoint(3, i,2769.5718,-1953.5166,13.3783) || PlayerToPoint(3, i,679.4280,-1276.8392,13.5956) || PlayerToPoint(3, i,2156.3076,-1455.8517,25.5391) || PlayerToPoint(3, i,2494.8640,-1668.1879,13.3438))
  397. {
  398. GameTextForPlayer(i, "~g~Gang Seif,~n~~y~Scrie /depune ca sa depui si /retrage ca sa scoti", 5000, 5);
  399. }
  400. else if (PlayerToPoint(3, i,597.1277,-1248.6479,18.2734))
  401. {
  402. GameTextForPlayer(i, "~w~Type ~r~/Materials get ~w~ to get some materials", 5000, 5);
  403. }
  404. else if (PlayerToPoint(3, i,-2119.5469,-178.5679,35.3203))
  405. {
  406. GameTextForPlayer(i, "~w~Type ~g~/Materials deliver ~w~ to deliver materials", 5000, 5);
  407. }
  408. else if (PlayerToPoint(3, i,-1982.8839,164.2848,27.6875))
  409. {
  410. GameTextForPlayer(i, "~w~Type: ~r~/withdraw ~w~to withdraw your money", 5000, 5);
  411. }
  412. else if (PlayerToPoint(2, i,1080.9414,-344.6483,73.9815))
  413. {
  414. GameTextForPlayer(i, "~r~Order ~w~Place.", 5000, 3);
  415. }
  416. else if (PlayerToPoint(2.0, i,-2640.9878,635.8196,14.4531) || PlayerToPoint(2.0, i,1179.4683,-1338.6075,13.8445))
  417. {
  418. GameTextForPlayer(i, "~w~Type /get healkit, to get ~r~HealKit", 5000, 3);
  419. SetPlayerHealthEx(i, 100);
  420. }
  421. }
  422. return 1;
  423. }
RAW Paste Data