Guest User

Untitled

a guest
Mar 9th, 2014
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.96 KB | None | 0 0
  1. public SetPlayerUnjail()
  2. {
  3. new string[128];
  4. for(new i = 0; i<MAX_PLAYERS; i++)
  5. {
  6. if(PlayerInfo[i][Robbing] == 1 && PlayerInfo[i][CashLoading] != 0)
  7. {
  8. PlayerInfo[i][CashLoading] -= 1;
  9. if(PlayerInfo[i][CashLoading] == 0)
  10. {
  11. PlayerInfo[i][CashLoaded] += 10000;
  12. SendClientMessage(i, COLOR_YELLOW, "** You now have an extra $10,000 in your cash bag.");
  13. if(PlayerInfo[i][CashLoaded] >= 200000)
  14. {
  15. PlayerInfo[i][CashLoaded] = 200000;
  16. SendClientMessage(i, COLOR_YELLOW, "** You can't hold more than $200,000 in the bag.");
  17. }
  18. }
  19. }
  20. }
  21. if(PaintballPlayers >= 2 && PaintballRound != 1 && StartingPaintballRound != 1)
  22. {
  23. StartingPaintballRound = 1;
  24. SetTimer("PreparePaintball", 15000, 0);
  25. }
  26. //foreach(Player, i)
  27. for(new i; i<MAX_PLAYERS; i++)
  28. {
  29. if(IsPlayerConnected(i))
  30. {
  31. new level = PlayerInfo[i][pLevel];
  32. if(level >= 0 && level <= 2) { PlayerInfo[i][pPayCheck] += 1; }
  33. else if(level >= 3 && level <= 4) { PlayerInfo[i][pPayCheck] += 2; }
  34. else if(level >= 5 && level <= 6) { PlayerInfo[i][pPayCheck] += 3; }
  35. else if(level >= 7 && level <= 8) { PlayerInfo[i][pPayCheck] += 4; }
  36. else if(level >= 9 && level <= 10) { PlayerInfo[i][pPayCheck] += 5; }
  37. else if(level >= 11 && level <= 12) { PlayerInfo[i][pPayCheck] += 6; }
  38. else if(level >= 13 && level <= 14) { PlayerInfo[i][pPayCheck] += 7; }
  39. else if(level >= 15 && level <= 16) { PlayerInfo[i][pPayCheck] += 8; }
  40. else if(level >= 17 && level <= 18) { PlayerInfo[i][pPayCheck] += 9; }
  41. else if(level >= 19 && level <= 20) { PlayerInfo[i][pPayCheck] += 10; }
  42. else if(level >= 21) { PlayerInfo[i][pPayCheck] += 11; }
  43. if(PlayerInfo[i][pJailed] > 0)
  44. {
  45. if(PlayerInfo[i][pJailTime] > 0 && WantLawyer[i] == 0)
  46. {
  47. PlayerInfo[i][pJailTime]--;
  48. }
  49. if(PlayerInfo[i][pJailTime] <= 0 && WantLawyer[i] == 0)
  50. {
  51. PlayerInfo[i][pJailTime] = 0;
  52. if(PlayerInfo[i][pJailed] == 1)
  53. {
  54. SetPlayerInterior(i, 6);
  55. SetPlayerPos(i,1551.4275,-1675.0511,15.8413); //puts player in the jail
  56. SetPlayerFacingAngle(i,90.0000);
  57. SetCameraBehindPlayer(i);
  58. }
  59. else if(PlayerInfo[i][pJailed] == 2)
  60. {
  61. if(PlayerCell == 0)
  62. {
  63. SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
  64. SetPlayerFacingAngle( i, 0.0);
  65. }
  66. if(PlayerCell == 1)
  67. {
  68. SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
  69. SetPlayerFacingAngle( i, 0.0);
  70. }
  71. if(PlayerCell == 2)
  72. {
  73. SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
  74. SetPlayerFacingAngle( i, 0.0);
  75. }
  76. if(PlayerCell == 3)
  77. {
  78. SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
  79. SetPlayerFacingAngle( i, 0.0);
  80. }
  81. if(PlayerCell == 4)
  82. {
  83. SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
  84. SetPlayerFacingAngle( i, 0.0);
  85. }
  86. if(PlayerCell == 5)
  87. {
  88. SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
  89. SetPlayerFacingAngle( i, 0.0);
  90. }
  91. if(PlayerCell == 6)
  92. {
  93. SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
  94. SetPlayerFacingAngle( i, 180.0);
  95. }
  96. if(PlayerCell == 7)
  97. {
  98. SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
  99. SetPlayerFacingAngle( i, 180.0);
  100. }
  101. if(PlayerCell == 8)
  102. {
  103. SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
  104. SetPlayerFacingAngle( i, 180.0);
  105. }
  106. if(PlayerCell == 9)
  107. {
  108. SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
  109. SetPlayerFacingAngle( i, 180.0);
  110. }
  111. if(PlayerCell == 10)
  112. {
  113. SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
  114. SetPlayerFacingAngle( i, 180.0);
  115. }
  116. if(PlayerCell == 11)
  117. {
  118. SetPlayerPos(i, 1593.8257,-1714.2469,1441.1000);
  119. SetPlayerFacingAngle( i, 180.0);
  120. }
  121. }
  122. /* if(PlayerInfo[playerid][pJailed] == 3)
  123. {
  124. SetPlayerPos(playerid, -1070.8547,-2040.0,49.1448);
  125. SetPlayerWorldBounds(playerid, 20000.0, -20000.0, 20000.0, -20000.0);
  126. TogglePlayerControllable(playerid, 1);
  127. SetCameraBehindPlayer(playerid);
  128. }*/
  129. PlayerInfo[i][pJailed] = 0;
  130. SendClientMessage(i, COLOR_GRAD1," You have paid your debt to society.");
  131. format(string, sizeof(string), "~g~Freedom~n~~w~Try to be a better citizen");
  132. GameTextForPlayer(i, string, 5000, 1);
  133. SetCameraBehindPlayer(i);
  134. TogglePlayerControllable(i, 1);
  135. ClearCrime(i);
  136. SetPlayerToTeamColor(i);
  137. }
  138. }
  139. //moneycheat
  140. if(GetPlayerMoney(i) != PlayerInfo[i][pCash])
  141. {
  142. ResetPlayerMoney(i);
  143. GivePlayerMoney(i,PlayerInfo[i][pCash]);
  144. }
  145. if(UsedFind[i] >= 1)
  146. {
  147. UsedFind[i] += 1;
  148. if(UsedFind[i] >= FReloadTime[i])
  149. {
  150. UsedFind[i] = 0;
  151. }
  152. }
  153. if(GotMats[i] >= 1)
  154. {
  155. GotMats[i] += 1;
  156. if(GotMats[i] >= 10)
  157. {
  158. GotMats[i] = 0;
  159. }
  160. }
  161. if(HospitalTime[i] >= 1)
  162. {
  163. if(HospitalTime[i] >= 49)
  164. {
  165. new cut = deathcost;
  166. if(PlayerInfo[i][pMember] == 4 || PlayerInfo[i][pLeader] == 4) //medics
  167. {
  168. cut = deathcost/2;
  169. }
  170. PlayerInfo[i][pCash] = PlayerInfo[i][pCash]-cut;
  171. GivePlayerMoney(i, PlayerInfo[i][pCash]);
  172. format(string, sizeof(string), "Doctor: Your Medical Bill comes to $%d, have a nice day.", cut);
  173. SendClientMessage(i, COLOR_WHITE, string);
  174. SetPlayerHealth(i, 45);
  175. SetPlayerArmour(i, PlayerInfo[i][pSHealth]);
  176. SetPlayerPos(i, HospitalSpawns[HospitalSpawn[i]][0], HospitalSpawns[HospitalSpawn[i]][1], HospitalSpawns[HospitalSpawn[i]][2]);
  177. SetPlayerFacingAngle(i, HospitalSpawns[HospitalSpawn[i]][3]);
  178. HospitalTime[i] = 0; HospitalSpawn[i] = 0; PlayerInfo[i][pHospital] = 0; PlayerInfo[i][pDeaths] += 1;
  179. TogglePlayerControllable(i, 1);
  180. SetCameraBehindPlayer(i);
  181. SetPlayerToTeamColor(i);
  182. }
  183. else
  184. {
  185. if(HospitalTime[i] < 5)
  186. {
  187. SetPlayerHealth(i, 1);
  188. }
  189. else
  190. {
  191. new Float:health;
  192. GetPlayerHealth(i, health);
  193. SetPlayerHealth(i, health += 1);
  194. }
  195. HospitalTime[i] += 1;
  196. }
  197. }
  198. if(PlayerInfo[i][pSuspendLic] > 0)//suspendedlicense
  199. {
  200. if(PlayerInfo[i][pSuspendLic] == 1)
  201. {
  202. if(PlayerInfo[i][pCarLic] == 2)
  203. {
  204. SendClientMessage(i, COLOR_YELLOW, " Your suspension is over and have been charged $10 for a new license.");
  205. SendClientMessage(i, TEAM_GROVE_COLOR, " Drive safely.");
  206. GameTextForPlayer(i,"~r~$10", 5000, 3);
  207. GivePlayerMoney(i,-10);
  208. PlayerInfo[i][pCarLic] = 1;
  209. PlayerInfo[i][pSuspendLic] -= 1;
  210. }
  211. else if(PlayerInfo[i][pCarLic] == 3)
  212. {
  213. SendClientMessage(i, COLOR_YELLOW, " Your license is no longer cancelled, you may purchase a new license from the DMV.");
  214. PlayerInfo[i][pCarLic] = 0;
  215. PlayerInfo[i][pSuspendLic] -= 1;
  216. }
  217. else
  218. {
  219. PlayerInfo[i][pSuspendLic] -= 1;
  220. }
  221. }
  222. else if(PlayerInfo[i][pSuspendLic] <= 0)
  223. {
  224. PlayerInfo[i][pSuspendLic] = 0;
  225. }
  226. else
  227. {
  228. PlayerInfo[i][pSuspendLic] -= 1;
  229. }
  230. }
  231. if(WantLawyer[i] >= 1)
  232. {
  233. CallLawyer[i] = 111;
  234. if(WantLawyer[i] == 1)
  235. {
  236. SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
  237. }
  238. WantLawyer[i] ++;
  239. if(WantLawyer[i] == 8)
  240. {
  241. SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
  242. }
  243. if(WantLawyer[i] == 15)
  244. {
  245. SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
  246. }
  247. if(WantLawyer[i] == 20)
  248. {
  249. SendClientMessage(i, COLOR_LIGHTRED, "There is no Lawyer available to you anymore, Jail Time started.");
  250. WantLawyer[i] = 0;
  251. CallLawyer[i] = 0;
  252. }
  253. }
  254. if(TutTime[i] >= 1)
  255. {
  256. TutTime[i] += 1;
  257. if(TutTime[i] == 3)
  258. {
  259. ClearChatbox(i, 100);
  260. ShowTUT(i);
  261. TextDrawShowForPlayer(i, TutText[0]);
  262. //FadeColorForPlayer(i,0,0,0,0,0,0,0,255,15,0);
  263. }
  264. else if(TutTime[i] == 15) // Houses
  265. {
  266. SetPlayerPos(i, 2268.8899,-2602.1863,4.1938);
  267. SetPlayerCameraPos(i, 2178.9834,-2649.7114,30.5982);
  268. SetPlayerCameraLookAt(i, 2178.9834,-2649.7114,30.5982);
  269. }
  270. else if(TutTime[i] == 17)
  271. {
  272. TextDrawHideForPlayer(i, TutText[0]);
  273. TextDrawShowForPlayer(i, TutText[1]);
  274. }
  275. else if(TutTime[i] == 35) // Businesses
  276. {
  277. SetPlayerPos(i, 1250.8257,-1076.3053,0.0000);
  278. SetPlayerCameraPos(i, 1248.8798,-1079.0498,32.4765);
  279. SetPlayerCameraLookAt(i, 1248.8798,-1079.0498,32.4765);
  280. }
  281. else if(TutTime[i] == 37)
  282. {
  283. TextDrawHideForPlayer(i, TutText[1]);
  284. TextDrawShowForPlayer(i, TutText[2]);
  285. }
  286. else if(TutTime[i] == 55) // Dealerships
  287. {
  288. SetPlayerPos(i, 1317.1320,-1555.4285,0.0000);
  289. SetPlayerCameraPos(i, 1320.8629,-1558.1262,14.5703);
  290. SetPlayerCameraLookAt(i, 1320.8629,-1558.1262,14.5703);
  291. }
  292. else if(TutTime[i] == 57)
  293. {
  294. TextDrawHideForPlayer(i, TutText[2]);
  295. TextDrawShowForPlayer(i, TutText[3]);
  296. }
  297. else if(TutTime[i] == 75) // AD Agencies
  298. {
  299. SetPlayerPos(i, 563.7955,-1275.2495,0.0000);
  300. SetPlayerCameraPos(i, 516.7933,-1275.3964,22.6855);
  301. SetPlayerCameraLookAt(i, 516.7933,-1275.3964,22.6855);
  302. }
  303. else if(TutTime[i] == 77)
  304. {
  305. //PlayAudioStreamForPlayer(i,"https://dl.dropbox.com/u/54373498/Spiderman%202%20music%20trailer%20-40sec%20-%20Lacrimosa.mp3");
  306. ClearChatbox(i, 100);
  307. TextDrawHideForPlayer(i, TutText[3]);
  308. TextDrawShowForPlayer(i, TutText[4]);
  309. }
  310. else if(TutTime[i] == 95) // WareHouses
  311. {
  312. SetPlayerPos(i, 628.8734,-1356.3269,0.0000);
  313. SetPlayerCameraPos(i, 625.2649,-1356.8220,15.9045);
  314. SetPlayerCameraLookAt(i, 625.2649,-1356.8220,15.9045);
  315. }
  316. else if(TutTime[i] == 97)
  317. {
  318. TextDrawHideForPlayer(i, TutText[4]);
  319. TextDrawShowForPlayer(i, TutText[5]);
  320. }
  321. else if(TutTime[i] == 115) // The End
  322. {
  323. SetPlayerPos(i, 1305.5662841797,-1543.8950195313,122.20141601563);
  324. SetPlayerCameraPos(i, 1460.0, -1324.0, 287.2);
  325. SetPlayerCameraLookAt(i, 1374.5, -1291.1, 239.0);
  326. }
  327. else if(TutTime[i] == 117)
  328. {
  329. TextDrawHideForPlayer(i, TutText[5]);
  330. TextDrawShowForPlayer(i, TutText[6]);
  331.  
  332. }
  333. else if(TutTime[i] == 135)
  334. {
  335. TextDrawHideForPlayer(i, TutText[6]);
  336. TextDrawShowForPlayer(i, TutText[7]);
  337. //FadeColorForPlayer(i,0,0,0,0,0,0,0,255,15,0);
  338. }
  339. else if(TutTime[i] == 150)
  340. {
  341. HideTUT(i);
  342. HideGUI(i);
  343. //FadeColorForPlayer(i,0,0,0,255,0,0,0,0,15,0);
  344. SendClientMessage(i, COLOR_WHITE, "[Life-Story]- After 20 years of prison... It's freedom - Spending a 20 year in prison isn't with an easy thing , It's time to get back.");
  345. SendClientMessage(i, COLOR_WHITE, "[Life-Story]- However , Your criminal records have been deleted - You are now clean , You can start clean.. Or stay dirty.");
  346. SendClientMessage(i, COLOR_WHITE, "[Life-Story]- Your life - Your rules , What will you do ?");
  347. SendClientMessage(i, COLOR_LIGHTRED, "(( OOC : Head to the Renting-Shop near unity station incase you need to rent a vehicle. ))");
  348. CanTalk[i] = 1;
  349. TutTime[i] = 0;
  350. PlayerInfo[i][pSafeSpawn] = 1;
  351. PlayerInfo[i][pTut] = 1;
  352. gOoc[i] = 0; gNewbie[i] = 0; gNews[i] = 0; gFam[i] = 0;
  353. TogglePlayerControllable(i, 1);
  354. PlayerInfo[i][pHealth] = 100;
  355. PlayerInfo[i][pArmor] = 0;
  356. SetPlayerSpawn(i);
  357. ApplyAnimation(i,"PED","WALK_GANG1",4.1,1,1,1,50,1);
  358. }
  359. }
  360. }
  361. if(PlayerTazeTime[i] >= 1)
  362. {
  363. PlayerTazeTime[i] += 1;
  364. if(PlayerTazeTime[i] == 15)
  365. {
  366. PlayerTazeTime[i] = 0;
  367. }
  368. else
  369. {
  370. new Float:angle;
  371. GetPlayerFacingAngle(i, angle);
  372. SetPlayerFacingAngle(i, angle + 90);
  373. }
  374. }
  375. if(PlayerPotStoned[i] >= 6)
  376. {
  377. PlayerPotStoned[i] += 1;
  378. if(IsPlayerInAnyVehicle(i))
  379. {
  380. if(GetPlayerState(i) == 2)
  381. {
  382. if(PlayerPotStoned[i] == 10 || PlayerPotStoned[i]==20 || PlayerPotStoned[i]==30 || PlayerPotStoned[i]==40 || PlayerPotStoned[i]==50)
  383. {
  384. new Float:angle;
  385. GetPlayerFacingAngle(i, angle);
  386. SetVehicleZAngle(GetPlayerVehicleID(i), angle + 25);
  387. SetPlayerWeather(i, -59);
  388. }
  389. }
  390. }
  391. if(PlayerPotStoned[i] == 60)
  392. {
  393. PlayerPotStoned[i] = 0;
  394. SendClientMessage(i,COLOR_GREY," You are no longer stoned !");
  395. SetPlayerDrunkLevel(i, 0);
  396. SetPlayerWeather(i, 12);
  397. }
  398. }
  399. if(PlayerCrackStoned[i] >= 6)
  400. {
  401. PlayerCrackStoned[i] += 1;
  402. if(IsPlayerInAnyVehicle(i))
  403. {
  404. if(GetPlayerState(i) == 2)
  405. {
  406. if(PlayerCrackStoned[i] == 10 || PlayerCrackStoned[i]==20 || PlayerCrackStoned[i]==30 || PlayerCrackStoned[i]==40 || PlayerCrackStoned[i]==50)
  407. {
  408. new Float:angle;
  409. GetPlayerFacingAngle(i, angle);
  410. SetVehicleZAngle(GetPlayerVehicleID(i), angle + 25);
  411. SetPlayerWeather(i, 16);
  412. }
  413. }
  414. }
  415. if(PlayerCrackStoned[i] == 60)
  416. {
  417. PlayerCrackStoned[i] = 0;
  418. SendClientMessage(i,COLOR_GREY," You are no longer stoned !");
  419. SetPlayerDrunkLevel(i, 0);
  420. SetPlayerWeather(i, 12);
  421. }
  422. }
  423. if(Called911[i] > 0)
  424. {
  425. Called911[i] += 1;
  426. if(Called911[i] == 120)
  427. {
  428. SetPlayerToTeamColor(i);
  429. Called911[i] = 0;
  430. }
  431. }
  432. if(PlayerInfo[i][pCarTime] > 0)
  433. {
  434. if(PlayerInfo[i][pCarTime] <= 0)
  435. {
  436. PlayerInfo[i][pCarTime] = 0;
  437. }
  438. else
  439. {
  440. PlayerInfo[i][pCarTime] -= 1;
  441. }
  442. }
  443. if(PlayerInfo[i][pDrugsTime] > 0)
  444. {
  445. if(PlayerInfo[i][pDrugsTime] <= 0)
  446. {
  447. PlayerInfo[i][pDrugsTime] = 0;
  448. }
  449. else
  450. {
  451. PlayerInfo[i][pDrugsTime] -= 1;
  452. }
  453. }
  454. if(PlayerInfo[i][pLawyerTime] > 0)
  455. {
  456. if(PlayerInfo[i][pLawyerTime] <= 0)
  457. {
  458. PlayerInfo[i][pLawyerTime] = 0;
  459. }
  460. else
  461. {
  462. PlayerInfo[i][pLawyerTime] -= 1;
  463. }
  464. }
  465. if(PlayerInfo[i][pLawyerFreeTime] > 0)
  466. {
  467. if(PlayerInfo[i][pLawyerFreeTime] <= 0)
  468. {
  469. PlayerInfo[i][pLawyerFreeTime] = 0;
  470. }
  471. else
  472. {
  473. PlayerInfo[i][pLawyerFreeTime] -= 1;
  474. }
  475. }
  476. if(PlayerInfo[i][pMechTime] > 0)
  477. {
  478. if(PlayerInfo[i][pMechTime] <= 0)
  479. {
  480. PlayerInfo[i][pMechTime] = 0;
  481. }
  482. else
  483. {
  484. PlayerInfo[i][pMechTime] -= 1;
  485. }
  486. }
  487. if(PlayerInfo[i][pSexTime] > 0)
  488. {
  489. if(PlayerInfo[i][pSexTime] <= 0)
  490. {
  491. PlayerInfo[i][pSexTime] = 0;
  492. }
  493. else
  494. {
  495. PlayerInfo[i][pSexTime] -= 1;
  496. }
  497. }
  498. if(BoxWaitTime[i] > 0)
  499. {
  500. if(BoxWaitTime[i] >= BoxDelay)
  501. {
  502. BoxDelay = 0;
  503. BoxWaitTime[i] = 0;
  504. PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
  505. GameTextForPlayer(i, "~g~Match Started", 5000, 1);
  506. TogglePlayerControllable(i, 1);
  507. RoundStarted = 1;
  508. }
  509. else
  510. {
  511. format(string, sizeof(string), "%d", BoxDelay - BoxWaitTime[i]);
  512. GameTextForPlayer(i, string, 1500, 6);
  513. BoxWaitTime[i] += 1;
  514. }
  515. }
  516. if(RoundStarted > 0)
  517. {
  518. if(PlayerBoxing[i] > 0)
  519. {
  520. new trigger = 0;
  521. new Lost = 0;
  522. new Float:angle;
  523. new Float:health;
  524. GetPlayerHealth(i, health);
  525. if(health < 12)
  526. {
  527. if(i == Boxer1) { Lost = 1; trigger = 1; }
  528. else if(i == Boxer2) { Lost = 2; trigger = 1; }
  529. }
  530. if(health < 28) { GetPlayerFacingAngle(i, angle); SetPlayerFacingAngle(i, angle + 85); }
  531. if(trigger)
  532. {
  533. new winner[MAX_PLAYER_NAME];
  534. new loser[MAX_PLAYER_NAME];
  535. new titel[MAX_PLAYER_NAME];
  536. if(Lost == 1)
  537. {
  538. if(IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2))
  539. {
  540. SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186); SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
  541. SetPlayerInterior(Boxer1, 5); SetPlayerInterior(Boxer2, 5);
  542. GetPlayerName(Boxer1, loser, sizeof(loser));
  543. GetPlayerName(Boxer2, winner, sizeof(winner));
  544. if(PlayerInfo[Boxer1][pJob] == 12) { PlayerInfo[Boxer1][pLoses] += 1; }
  545. if(PlayerInfo[Boxer2][pJob] == 12) { PlayerInfo[Boxer2][pWins] += 1; }
  546. if(TBoxer < 255)
  547. {
  548. if(IsPlayerConnected(TBoxer))
  549. {
  550. if(TBoxer != Boxer2)
  551. {
  552. if(PlayerInfo[Boxer2][pJob] == 10)
  553. {
  554. TBoxer = Boxer2;
  555. GetPlayerName(TBoxer, titel, sizeof(titel));
  556. new nstring[MAX_PLAYER_NAME];
  557. format(nstring, sizeof(nstring), "%s", titel);
  558. strmid(Titel[TitelName], nstring, 0, strlen(nstring), 255);
  559. Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
  560. Titel[TitelLoses] = PlayerInfo[TBoxer][pLoses];
  561. SaveBoxer();
  562. format(string, sizeof(string), "Boxing News: %s has Won the fight against Champion %s and is now the new Boxing Champion.", titel, loser);
  563. OOCOff(COLOR_WHITE,string);
  564. }
  565. else
  566. {
  567. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You would have been the Champion if you had the Boxer Job !");
  568. }
  569. }
  570. else
  571. {
  572. GetPlayerName(TBoxer, titel, sizeof(titel));
  573. format(string, sizeof(string), "Boxing News: Boxing Champion %s has Won the fight against %s.", titel, loser);
  574. OOCOff(COLOR_WHITE,string);
  575. Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
  576. Titel[TitelLoses] = PlayerInfo[Boxer2][pLoses];
  577. SaveBoxer();
  578. }
  579. }
  580. }//TBoxer
  581. format(string, sizeof(string), "* You have Lost the Fight against %s.", winner);
  582. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, string);
  583. GameTextForPlayer(Boxer1, "~r~You lost", 3500, 1);
  584. format(string, sizeof(string), "* You have Won the Fight against %s.", loser);
  585. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, string);
  586. GameTextForPlayer(Boxer2, "~r~You won", 3500, 1);
  587. if(GetPlayerHealth(Boxer1, health) < 20)
  588. {
  589. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
  590. SetPlayerHealth(Boxer1, 30.0);
  591. }
  592. else
  593. {
  594. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
  595. SetPlayerHealth(Boxer1, 50.0);
  596. }
  597. if(GetPlayerHealth(Boxer2, health) < 20)
  598. {
  599. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
  600. SetPlayerHealth(Boxer2, 30.0);
  601. }
  602. else
  603. {
  604. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
  605. SetPlayerHealth(Boxer2, 50.0);
  606. }
  607. GameTextForPlayer(Boxer1, "~g~Match Over", 5000, 1); GameTextForPlayer(Boxer2, "~g~Match Over", 5000, 1);
  608. if(PlayerInfo[Boxer2][pJob] == 10) { PlayerInfo[Boxer2][pBoxSkill] += 1; }
  609. PlayerBoxing[Boxer1] = 0;
  610. PlayerBoxing[Boxer2] = 0;
  611. }
  612. }
  613. else if(Lost == 2)
  614. {
  615. if(IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2))
  616. {
  617. SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186); SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
  618. SetPlayerInterior(Boxer1, 5); SetPlayerInterior(Boxer2, 5);
  619. GetPlayerName(Boxer1, winner, sizeof(winner));
  620. GetPlayerName(Boxer2, loser, sizeof(loser));
  621. if(PlayerInfo[Boxer2][pJob] == 10) { PlayerInfo[Boxer2][pLoses] += 1; }
  622. if(PlayerInfo[Boxer1][pJob] == 10) { PlayerInfo[Boxer1][pWins] += 1; }
  623. if(TBoxer < 255)
  624. {
  625. if(IsPlayerConnected(TBoxer))
  626. {
  627. if(TBoxer != Boxer1)
  628. {
  629. if(PlayerInfo[Boxer1][pJob] == 10)
  630. {
  631. TBoxer = Boxer1;
  632. GetPlayerName(TBoxer, titel, sizeof(titel));
  633. new nstring[MAX_PLAYER_NAME];
  634. format(nstring, sizeof(nstring), "%s", titel);
  635. strmid(Titel[TitelName], nstring, 0, strlen(nstring), 255);
  636. Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
  637. Titel[TitelLoses] = PlayerInfo[TBoxer][pLoses];
  638. SaveBoxer();
  639. format(string, sizeof(string), "Boxing News: %s has Won the fight against Champion %s and is now the new Boxing Champion.", titel, loser);
  640. OOCOff(COLOR_WHITE,string);
  641. }
  642. else
  643. {
  644. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You would have been the Champion if you had the Boxer Job !");
  645. }
  646. }
  647. else
  648. {
  649. GetPlayerName(TBoxer, titel, sizeof(titel));
  650. format(string, sizeof(string), "Boxing News: Boxing Champion %s has Won the fight against %s.", titel, loser);
  651. OOCOff(COLOR_WHITE,string);
  652. Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
  653. Titel[TitelLoses] = PlayerInfo[Boxer1][pLoses];
  654. SaveBoxer();
  655. }
  656. }
  657. }//TBoxer
  658. format(string, sizeof(string), "* You have Lost the Fight against %s.", winner);
  659. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, string);
  660. GameTextForPlayer(Boxer2, "~r~You lost", 3500, 1);
  661. format(string, sizeof(string), "* You have Won the Fight against %s.", loser);
  662. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, string);
  663. GameTextForPlayer(Boxer1, "~g~You won", 3500, 1);
  664. if(GetPlayerHealth(Boxer1, health) < 20)
  665. {
  666. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
  667. SetPlayerHealth(Boxer1, 30.0);
  668. }
  669. else
  670. {
  671. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
  672. SetPlayerHealth(Boxer1, 50.0);
  673. }
  674. if(GetPlayerHealth(Boxer2, health) < 20)
  675. {
  676. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
  677. SetPlayerHealth(Boxer2, 30.0);
  678. }
  679. else
  680. {
  681. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
  682. SetPlayerHealth(Boxer2, 50.0);
  683. }
  684. GameTextForPlayer(Boxer1, "~g~Match Over", 5000, 1); GameTextForPlayer(Boxer2, "~g~Match Over", 5000, 1);
  685. if(PlayerInfo[Boxer1][pJob] == 10) { PlayerInfo[Boxer1][pBoxSkill] += 1; }
  686. PlayerBoxing[Boxer1] = 0;
  687. PlayerBoxing[Boxer2] = 0;
  688. }
  689. }
  690. InRing = 0;
  691. RoundStarted = 0;
  692. Boxer1 = 255;
  693. Boxer2 = 255;
  694. TBoxer = 255;
  695. trigger = 0;
  696. }
  697. }
  698. }
  699. if(StartingPaintballRound == 1 && AnnouncedPaintballRound == 0)
  700. {
  701. AnnouncedPaintballRound = 1;
  702. if(PlayerPaintballing[i] != 0)
  703. {
  704. SendClientMessage(i, COLOR_YELLOW, "Paintball Match will be announced in 15 seconds.");
  705. }
  706. }
  707. if(FindTime[i] > 0)
  708. {
  709. if(FindTime[i] == FindTimePoints[i])
  710. {
  711. PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
  712. GameTextForPlayer(i, "~r~Redmarker gone", 2500, 1);
  713. FindTime[i] = 0;
  714. FindTimePoints[i] = 0;
  715. new target = FindingID[i];
  716. if(Called911[target] != 0)
  717. {
  718. SetAllCopCheckpoint(target);
  719. }
  720. else
  721. {
  722. SetPlayerToTeamColor(target);
  723. }
  724. FindingID[i] = 0;
  725. }
  726. else
  727. {
  728. format(string, sizeof(string), "%d", FindTimePoints[i] - FindTime[i]);
  729. GameTextForPlayer(i, string, 1500, 5);
  730. FindTime[i] += 1;
  731. }
  732. }
  733. if(TaxiCallTime[i] > 0)
  734. {
  735. if(TaxiAccepted[i] < 999)
  736. {
  737. if(IsPlayerConnected(TaxiAccepted[i]))
  738. {
  739. new Float:X,Float:Y,Float:Z;
  740. GetPlayerPos(TaxiAccepted[i], X, Y, Z);
  741. SetPlayerCheckpoint(i, X, Y, Z, 5);
  742. }
  743. }
  744. }
  745. if(BusCallTime[i] > 0)
  746. {
  747. if(BusAccepted[i] < 999)
  748. {
  749. if(IsPlayerConnected(BusAccepted[i]))
  750. {
  751. new Float:X,Float:Y,Float:Z;
  752. GetPlayerPos(BusAccepted[i], X, Y, Z);
  753. SetPlayerCheckpoint(i, X, Y, Z, 5);
  754. }
  755. }
  756. }
  757. if(MedicCallTime[i] > 0)
  758. {
  759. if(MedicCallTime[i] == 30) { MedicCallTime[i] = 0; DisablePlayerCheckpoint(i); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); GameTextForPlayer(i, "~r~RedMarker gone", 2500, 1); }
  760. else
  761. {
  762. format(string, sizeof(string), "%d", 30 - MedicCallTime[i]);
  763. GameTextForPlayer(i, string, 1500, 6);
  764. MedicCallTime[i] += 1;
  765. }
  766. }
  767. if(LawyerCallTime[i] > 0)
  768. {
  769. if(LawyerCallTime[i] == 30) { LawyerCallTime[i] = 0; DisablePlayerCheckpoint(i); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); GameTextForPlayer(i, "~r~RedMarker gone", 2500, 1); }
  770. else
  771. {
  772. format(string, sizeof(string), "%d", 30 - LawyerCallTime[i]);
  773. GameTextForPlayer(i, string, 1500, 6);
  774. LawyerCallTime[i] += 1;
  775. }
  776. }
  777. if(MechanicCallTime[i] > 0)
  778. {
  779. if(MechanicCallTime[i] == 30) { MechanicCallTime[i] = 0; DisablePlayerCheckpoint(i); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); GameTextForPlayer(i, "~r~RedMarker gone", 2500, 1); }
  780. else
  781. {
  782. format(string, sizeof(string), "%d", 30 - MechanicCallTime[i]);
  783. GameTextForPlayer(i, string, 1500, 6);
  784. MechanicCallTime[i] += 1;
  785. }
  786. }
  787. if(PlayerCuffed[i] == 1)
  788. {
  789. if(PlayerCuffedTime[i] <= 0)
  790. {
  791. ClearAnimations(i);
  792. TogglePlayerControllable(i, 1);
  793. PlayerCuffed[i] = 0;
  794. PlayerCuffedTime[i] = 0;
  795. PlayerTazeTime[i] = 0;
  796. }
  797. else
  798. {
  799. PlayerCuffedTime[i] -= 1;
  800. }
  801. }
  802. if(PlayerCuffed[i] == 2)
  803. {
  804. if(PlayerCuffedTime[i] <= 0)
  805. {
  806. GameTextForPlayer(i, "~r~You broke the Cuffs, you are free!", 2500, 3);
  807. TogglePlayerControllable(i, 1);
  808. PlayerCuffed[i] = 0;
  809. PlayerCuffedTime[i] = 0;
  810. }
  811. else
  812. {
  813. PlayerCuffedTime[i] -= 1;
  814. }
  815. }
  816. if(PlayerTied[i] == 1)
  817. {
  818. if(PlayerCuffedTime[i] <= 0)
  819. {
  820. GameTextForPlayer(i, "~r~You broke free of the Ropes, you are free!", 2500, 3);
  821. SetCameraBehindPlayer(i);
  822. PlayerBlinded[i] = 0;
  823. TogglePlayerControllable(i, 1);
  824. PlayerTied[i] = 0;
  825. PlayerCuffedTime[i] = 0;
  826. }
  827. else
  828. {
  829. PlayerCuffedTime[i] -= 1;
  830. }
  831. }
  832. /*
  833. if(IsPlayerInRangeOfPoint(i,20,2015.4500,1017.0900,996.8750))
  834. {//Four Dragons
  835. GameTextForPlayer(i, "~r~Closed", 5000, 1);
  836. SetPlayerInterior(i, 0);
  837. SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
  838. }
  839. else if(IsPlayerInRangeOfPoint(i,20,2233.9099,1710.7300,1011.2987))
  840. {//Caligula
  841. GameTextForPlayer(i, "~r~Closed", 5000, 1);
  842. SetPlayerInterior(i, 0);
  843. SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
  844. }
  845. else if(IsPlayerInRangeOfPoint(i,10,2265.7900,1619.5800,1090.4453))
  846. {//Caligula Roof 1
  847. GameTextForPlayer(i, "~r~Closed", 5000, 1);
  848. SetPlayerInterior(i, 0);
  849. SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
  850. }
  851. else if(IsPlayerInRangeOfPoint(i,10,2265.7800,1675.9301,1090.4453))
  852. {//Caligula Roof 2
  853. GameTextForPlayer(i, "~r~Closed", 5000, 1);
  854. SetPlayerInterior(i, 0);
  855. SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
  856. }
  857. else if(IsPlayerInRangeOfPoint(i,20,1133.0699,-9.5731,1000.6797))
  858. {//West Casino place
  859. GameTextForPlayer(i, "~r~Closed", 5000, 1);
  860. SetPlayerInterior(i, 0);
  861. SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
  862. }
  863. */
  864. }
  865. }
  866. //}
Advertisement
Add Comment
Please, Sign In to add comment