Day_Walker

Ayuda2

Oct 11th, 2014
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.33 KB | None | 0 0
  1. #include <a_samp>
  2. #pragma tabsize 0
  3.  
  4.  
  5. //noov
  6. // Variables
  7. new gTeam[MAX_PLAYERS];
  8. new Text:Textdraw0;
  9. new Text:Textdraw1;
  10. #define COLOR_GREY 0xC0C0C0AA
  11.  
  12. new Text:textdraw10;
  13. new Text:textdraw11;
  14. new Text:textdraw12;
  15. new Text:textdraw13;
  16. #define COLOR_YELLOW 0xFFFF00AA
  17.  
  18. new Text:TextGa,Text:TextCp,Scop,Sgangsta;
  19. new Text:Textdraw2, Text:Textdraw3;
  20. new count = 0;
  21. new count1 = 0;
  22. #define MAX_TEAM_MEMBERS 10
  23.  
  24. //Mission Textdraw
  25. new Text:Mission;
  26. //Objectives Textdraw
  27. new Text:ArmyO;
  28. new Text:TerriostO;
  29. new Timer2;
  30. new Timer8;
  31. new Timer5;
  32. new Timer4;
  33. new Timer10;
  34.  
  35. // Snow man by Zh3rO
  36. #define V03c
  37. #define COL_ORANGE "{FFAF00}"
  38. #define COL_GREEN "{6EF83C}"
  39. #define COL_RED "{FF4040}"
  40. #define COL_BLUE "{0285FF}"
  41. #define COL_YELLOW "{FFEA02}"
  42. #define COL_EASY "{85D5FF}"
  43. forward LoadTree( );
  44. ChangeColors( );
  45. UpdateTree( );
  46. DestroyTree( );
  47. HideTree( playerid );
  48. ShowTree( playerid );
  49. stock RGBA(R, G, B, A) return ( R * 16777216 ) + ( G * 65536 ) + ( B * 256 ) + A ;
  50.  
  51. new ArmyKills;
  52. new TerroristKills;
  53.  
  54.  
  55. forward ScoreChecker(playerid);
  56. forward ScoreUpdater(playerid);
  57.  
  58.  
  59.  
  60. new
  61. Text:ChristmasTree[23],
  62. RedValue,
  63. BlueValue,
  64. GreenValue,
  65. Phase,
  66. PhaseTimes,
  67. bool:pTree[ MAX_PLAYERS ]
  68. ;
  69.  
  70. // Army S***
  71. #define TEAM_Army 0
  72. #define Army_BAZOOKA 24
  73. #define Army_PISTOL 31
  74. #define Army_DILDO 34
  75. #define Army_SKIN 287 // Thanks RoamPT for helping me finding a Army skin :D
  76.  
  77. // Terrorist S***
  78. #define TEAM_Terrorist 1
  79. #define Terrorist_BAZOOKA 24
  80. #define Terrorist_PISTOL 30
  81. #define Terrorist_DILDO 34
  82. #define Terrorist_SKIN 47
  83.  
  84. #define COLOR_GREEN 0x33AA33AA
  85.  
  86. //Color defines
  87. #define blue1 0x2641FEAA
  88. #define blue 0x375FFFFF
  89. #define lightblue 0x33CCFFAA
  90.  
  91. #define red 0xFF0000AA
  92. #define green 0x33FF33AA
  93. #define yellow 0xFFFF00AA
  94. #define grey 0xC0C0C0AA
  95.  
  96.  
  97. #define orange 0xFF9900AA
  98. #define black 0x2C2727AA
  99. #define pink 0xFF66FFAA
  100. #define purple 0xcc55ccff
  101. #define white 0xFFFFFFAA
  102. #define green1 0x33AA33AA
  103. #define brown 0xA52A2AAA
  104. #define gold 0xFFDC00FF
  105. #define lime 0x37FF00FF
  106. #define COLOR_WHITE 0xFFFFFFFF
  107. stock SetArmyTeamSetUp(playerid)
  108. {
  109. SetPlayerTeam( playerid , 0 ) ;
  110. GivePlayerWeapon ( playerid , Army_BAZOOKA , 1000 ) ;
  111. GivePlayerWeapon ( playerid , Army_PISTOL , 1000 ) ;
  112. GivePlayerWeapon ( playerid , Army_DILDO , 1000 ) ;
  113. SetPlayerSkin ( playerid , Army_SKIN ) ;
  114. SetPlayerColor ( playerid , blue ) ;
  115. }
  116. stock SetTerroristTeamSetUp(playerid)
  117. {
  118. SetPlayerTeam ( playerid , 1 ) ;
  119. GivePlayerWeapon ( playerid , Terrorist_BAZOOKA , 1000 ) ;
  120. GivePlayerWeapon ( playerid , Terrorist_PISTOL , 1000 ) ;
  121. GivePlayerWeapon ( playerid , Terrorist_DILDO , 1000 ) ;
  122. SetPlayerSkin ( playerid , Terrorist_SKIN ) ;
  123. SetPlayerColor ( playerid , green ) ;
  124.  
  125. }
  126.  
  127.  
  128. main()
  129. {
  130. print ( "\n---------------------------------- " ) ;
  131. print ( " Christmas Wars\n");
  132. print ( "----------------------------------\n " ) ;
  133. }
  134.  
  135. forward AnnounceWinner(playerid);
  136. public OnGameModeInit()
  137. {
  138. SetGameModeText ( "Afghanistan" ) ;
  139.  
  140. SetWorldTime ( 12 ) ;
  141. SetWeather ( 2 ) ;
  142. Timer4 = SetTimer ( " ScoreChecker " , 300 , true ) ;
  143. Timer5 = SetTimer ( " ScoreUpdater " , 300 , true ) ;
  144. UsePlayerPedAnims();
  145. SetTimer("AnnounceWinner",300000,0);
  146. Timer8 = SetTimer("Next",270000,false);
  147.  
  148. //======TEXTDRAW!
  149.  
  150. TextCp = TextDrawCreate(75.0000000, 200.0000000,"0");
  151. TextGa = TextDrawCreate(110.0, 225.0,"0");
  152. Textdraw2 = TextDrawCreate(17.0, 200.0,"~g~Soldados:");
  153. Textdraw3 = TextDrawCreate(17.0, 225.0,"~r~Terroristas:");
  154. TextDrawAlignment(TextCp,0);
  155. TextDrawAlignment(TextGa,0);
  156. TextDrawAlignment(Textdraw2,0);
  157. TextDrawAlignment(Textdraw3,0);
  158. TextDrawBackgroundColor(TextCp,0x000000ff);
  159. TextDrawBackgroundColor(TextGa,0x000000ff);
  160. TextDrawBackgroundColor(Textdraw2,0x000000ff);
  161. TextDrawBackgroundColor(Textdraw3,0x000000ff);
  162. TextDrawFont(TextCp,1);
  163. TextDrawLetterSize(TextCp,0.499999,1.100000);
  164. TextDrawFont(TextGa,1);
  165. TextDrawLetterSize(TextGa,0.499999,1.100000);
  166. TextDrawFont(Textdraw2,3);
  167. TextDrawLetterSize(Textdraw2,0.499999,1.100000);
  168. TextDrawFont(Textdraw3,3);
  169. TextDrawLetterSize(Textdraw3,0.399999,1.100000);
  170. TextDrawColor(TextCp,0xFFFFFFAA);
  171. TextDrawColor(TextGa,0xFFFFFFAA);
  172. TextDrawColor(Textdraw2,0x0000ff99);
  173. TextDrawColor(Textdraw3,0xFF0000FF);
  174. TextDrawSetOutline(TextCp,1);
  175. TextDrawSetOutline(TextGa,1);
  176. TextDrawSetOutline(Textdraw2,1);
  177. TextDrawSetOutline(Textdraw3,1);
  178. TextDrawSetProportional(TextCp,1);
  179. TextDrawSetProportional(TextGa,1);
  180. TextDrawSetProportional(Textdraw2,1);
  181. TextDrawSetProportional(Textdraw3,1);
  182. TextDrawSetShadow(TextCp,1);
  183. TextDrawSetShadow(TextGa,1);
  184. TextDrawSetShadow(Textdraw2,1);
  185. TextDrawSetShadow(Textdraw3,1);
  186. Scop=0;
  187. Sgangsta=0;
  188.  
  189.  
  190. //Mission name
  191. Mission = TextDrawCreate(207,435,"~w~Mision: Afghanistan");
  192. TextDrawFont(Mission,2);
  193. //Objectives
  194. ArmyO = TextDrawCreate(81.000000, 325.000000, "~w~Elimina a todos los ~r~Terroristas");
  195. TextDrawBackgroundColor(ArmyO, 255);
  196. TextDrawFont(ArmyO, 1);
  197. TextDrawLetterSize(ArmyO, 0.400000, 1.000000);
  198. TextDrawColor(ArmyO, 65535);
  199. TextDrawSetOutline(ArmyO, 0);
  200. TextDrawSetProportional(ArmyO, 1);
  201.  
  202. TerriostO = TextDrawCreate(128.000000, 344.000000, "~w~Elimina a todos los ~g~Soldados");
  203. TextDrawBackgroundColor(TerriostO, 255);
  204. TextDrawFont(TerriostO, 1);
  205. TextDrawLetterSize(TerriostO, 0.429999, 1.000000);
  206. TextDrawColor(TerriostO, -16776961);
  207. TextDrawSetOutline(TerriostO, 0);
  208. TextDrawSetProportional(TerriostO, 1);
  209. TextDrawSetShadow(TerriostO, 1);
  210.  
  211.  
  212. for(new i=0; i<MAX_PLAYERS; i++)
  213. SetTimerEx("AutoBalance",6000,true,"d", i); //600000 = 10minutes.
  214.  
  215.  
  216. AddPlayerClass ( 47,2714.9746,618.8488,54.8764,130.3736,0,0,0,0,0,0 ) ; // Terrorist SPAWN
  217. AddPlayerClass ( 287,2854.0493,723.9025,53.9756,140.2235,0,0,0,0,0,0 ) ; // Army SPAWN
  218.  
  219.  
  220. CreateObject(11440, 2812.97338800, 638.79498200, 52.44635300, 0.0, 0.0, 495.0);
  221. CreateObject(12950, 2790.83691400, 661.77630600, 54.57166200, 0.0, 0.0, 315.0);
  222. CreateObject(16183, 2805.07836900, 780.85766600, 52.97165600, 0.0, 0.0, 0.0);
  223. CreateObject(16183, 2804.67797800, 726.85766600, 52.95166000, 0.0, 0.0, 0.0);
  224. CreateObject(16183, 2804.27758700, 672.85766600, 52.92166100, 0.0, 0.0, 0.0);
  225. CreateObject(16183, 2803.77758700, 618.85766600, 52.89165400, 0.0, 0.0, 0.0);
  226. CreateObject(16205, 2945.15039000, 704.86486800, 53.97165600, 0.0, 0.0, 180.0);
  227. CreateObject(16205, 2755.05029200, 519.96484300, 53.97165600, 0.0, 0.0, 451.0);
  228. CreateObject(2455, 2791.32348600, 659.22821000, 52.95166000, 0.0, 0.0, -225.0);
  229. CreateObject(2129, 2790.50927700, 658.40942300, 52.95166000, 0.0, 0.0, 45.0);
  230. CreateObject(2455, 2792.62377900, 657.92828300, 52.95166000, 0.0, 0.0, -225.0);
  231. CreateObject(2455, 2791.97363200, 658.57824700, 52.95166000, 0.0, 0.0, -225.0);
  232. CreateObject(2455, 2793.27368100, 657.27825900, 52.95166000, 0.0, 0.0, -225.0);
  233. CreateObject(2455, 2793.92358300, 656.62823400, 52.95166000, 0.0, 0.0, -225.0);
  234. CreateObject(2455, 2794.57348600, 655.97821000, 52.95166000, 0.0, 0.0, -225.0);
  235. CreateObject(16205, 2950.05029200, 624.86486800, 54.97165200, 0.0, 0.0, 180.0);
  236. CreateObject(2454, 2796.54492100, 653.79949900, 52.93965900, 0.0, 0.0, -315.0);
  237. CreateObject(2455, 2795.89086900, 653.14605700, 52.95166000, 0.0, 0.0, 45.0);
  238. CreateObject(865, 2740.78613200, 702.55731200, 53.50261300, 0.0, 0.0, 0.0);
  239. CreateObject(2416, 2793.79467700, 653.80590800, 52.95242600, 0.0, 0.0, 135.0);
  240. CreateObject(2415, 2790.45019500, 657.22137400, 52.95166000, 0.0, 0.0, 135.0);
  241. CreateObject(2455, 2795.22338800, 655.32818600, 52.95166000, 0.0, 0.0, -225.0);
  242. CreateObject(2637, 2803.88964800, 654.05114700, 53.35243200, 0.0, 0.0, 45.0);
  243. CreateObject(2455, 2795.87329100, 654.67816100, 52.95166000, 0.0, 0.0, -225.0);
  244. CreateObject(2149, 2791.02270500, 656.06573400, 54.05242900, 0.0, 0.0, 135.0);
  245. CreateObject(2638, 2802.53564400, 655.52093500, 53.55165400, 0.0, 0.0, 225.0);
  246. CreateObject(2419, 2791.81909100, 655.78082200, 52.95242600, 0.0, 0.0, 135.0);
  247. CreateObject(2638, 2799.96557600, 658.09094200, 53.56165600, 0.0, 0.0, 225.0);
  248. CreateObject(2637, 2801.21948200, 656.72125200, 53.35243200, 0.0, 0.0, 45.0);
  249. CreateObject(2256, 2800.47875900, 649.94250400, 54.65242700, 0.0, 0.0, 225.0);
  250. CreateObject(2637, 2798.56958000, 659.37127600, 53.35243200, 0.0, 0.0, 45.0);
  251. CreateObject(2639, 2797.60766600, 660.44702100, 53.47165600, 0.0, 0.0, 225.0);
  252. CreateObject(16205, 2811.05029200, 519.96484300, 53.97165600, 0.0, 0.0, 451.0);
  253. CreateObject(16205, 2910.05029200, 516.26477000, 55.97165200, 0.0, 0.0, 451.0);
  254. CreateObject(16205, 2648.05029200, 559.96484300, 53.97165600, 0.0, 0.0, 721.0);
  255. CreateObject(16205, 2649.05029200, 629.96484300, 53.97165600, 0.0, 0.0, 721.0);
  256. CreateObject(16205, 2650.05029200, 709.96484300, 53.97165600, 0.0, 0.0, 711.0);
  257. CreateObject(16205, 2680.05029200, 829.96484300, 53.97165200, 0.0, 0.0, 1341.0);
  258. CreateObject(16205, 2890.05029200, 790.96484300, 53.97165200, 0.0, 0.0, 1296.0);
  259. CreateObject(16205, 2800.05029200, 829.96484300, 53.97165200, 0.0, 0.0, 1341.0);
  260. CreateObject(16205, 2720.05029200, 835.96484300, 53.97165200, 0.0, 0.0, 1341.0);
  261. CreateObject(11440, 2787.27368100, 695.09515300, 52.44635300, 0.0, 0.0, 45.0);
  262. CreateObject(12957, 2783.13354400, 691.33044400, 53.57165900, 0.0, 0.0, 25.0);
  263. CreateObject(11444, 2768.49023400, 709.92504800, 52.97165600, 0.0, 0.0, 855.0);
  264. CreateObject(652, 2774.67041000, 707.79986500, 52.97165600, 0.0, 0.0, 0.0);
  265. CreateObject(11457, 2761.46337800, 730.24603200, 52.48065100, 0.0, 0.0, 315.0);
  266. CreateObject(12957, 2783.13354400, 691.33044400, 53.57165900, 0.0, 0.0, 25.0);
  267. CreateObject(11444, 2783.49023400, 724.92504800, 52.97165600, 0.0, 0.0, 855.0);
  268. CreateObject(11444, 2801.49023400, 709.92504800, 52.97165600, 0.0, 0.0, 1305.0);
  269. CreateObject(11444, 2798.25097600, 706.63476500, 52.97165600, 0.0, 0.0, 1305.0);
  270. CreateObject(11440, 2810.27368100, 723.09515300, 52.44635300, 0.0, 0.0, 315.0);
  271. CreateObject(11440, 2806.97338800, 739.39508000, 52.44635300, 0.0, 0.0, 495.0);
  272. CreateObject(11444, 2828.21118100, 736.38085900, 52.97947300, 0.0, 0.0, 45.0);
  273. CreateObject(11444, 2819.21118100, 745.38085900, 52.97947300, 0.0, 0.0, 45.0);
  274. CreateObject(11444, 2759.34912100, 750.59539700, 52.95130500, 0.0, 0.0, 45.0);
  275. CreateObject(11433, 2734.50097600, 750.40911800, 54.91958600, 0.0, 0.0, 45.0);
  276. CreateObject(11440, 2780.43530200, 755.21771200, 52.47946500, 0.0, 0.0, 225.0);
  277. CreateObject(11440, 2859.62182600, 677.79119800, 52.45166000, 0.0, 0.0, 45.0);
  278. CreateObject(11440, 2877.62182600, 683.79119800, 52.45166000, 0.0, 0.0, 495.0);
  279. CreateObject(11444, 2864.19458000, 697.58001700, 52.85166100, 0.0, 0.0, 315.0);
  280. CreateObject(11444, 2869.19458000, 692.58001700, 52.85166100, 0.0, 0.0, 315.0);
  281. CreateObject(11440, 2850.87548800, 599.05432100, 52.44979800, 0.0, 0.0, 45.0);
  282. CreateObject(865, 2882.85302700, 647.67797800, 52.96010500, 0.0, 0.0, 0.0);
  283. CreateObject(865, 2883.50439400, 660.57965000, 53.17932800, 0.0, 0.0, 0.0);
  284. CreateObject(865, 2876.76806600, 655.96746800, 52.95062200, 0.0, 0.0, 0.0);
  285. CreateObject(652, 2883.23608300, 655.01342700, 52.13833200, 0.0, 0.0, 0.0);
  286. CreateObject(11440, 2716.94091700, 680.22906400, 52.45166000, 0.0, 0.0, 45.0);
  287. CreateObject(11444, 2811.21118100, 751.38085900, 52.97947300, 0.0, 0.0, 135.0);
  288. CreateObject(16183, 2805.07836900, 780.85766600, 52.97165200, 0.0, 0.0, 0.0);
  289. CreateObject(16183, 2804.67797800, 726.85766600, 52.95166000, 0.0, 0.0, 0.0);
  290. CreateObject(16183, 2804.27758700, 672.85766600, 52.92166100, 0.0, 0.0, 0.0);
  291. CreateObject(16183, 2803.77758700, 618.85766600, 52.89165400, 0.0, 0.0, 0.0);
  292. CreateObject(16205, 2945.15039000, 704.86486800, 53.97165200, 0.0, 0.0, 180.0);
  293. CreateObject(16205, 2755.05029200, 519.96484300, 53.97165200, 0.0, 0.0, 451.0);
  294. CreateObject(16205, 2950.05029200, 624.86486800, 54.97165200, 0.0, 0.0, 180.0);
  295. CreateObject(16205, 2811.05029200, 519.96484300, 53.97165200, 0.0, 0.0, 451.0);
  296. CreateObject(16205, 2910.05029200, 516.26477000, 55.97165200, 0.0, 0.0, 451.0);
  297. CreateObject(16205, 2648.05029200, 559.96484300, 53.97165200, 0.0, 0.0, 721.0);
  298. CreateObject(16205, 2649.05029200, 629.96484300, 53.97165200, 0.0, 0.0, 721.0);
  299. CreateObject(16205, 2650.05029200, 709.96484300, 53.97165200, 0.0, 0.0, 711.0);
  300. CreateObject(16205, 2680.05029200, 829.96484300, 53.97165200, 0.0, 0.0, 1341.0);
  301. CreateObject(16205, 2890.05029200, 790.96484300, 53.97165200, 0.0, 0.0, 1296.0);
  302. CreateObject(16205, 2800.05029200, 829.96484300, 53.97165200, 0.0, 0.0, 1341.0);
  303. CreateObject(16205, 2720.05029200, 835.96484300, 53.97165200, 0.0, 0.0, 1341.0);
  304. CreateObject(11440, 2787.27368100, 695.09515300, 52.44635300, 0.0, 0.0, 45.0);
  305. CreateObject(12957, 2783.13354400, 691.33044400, 53.57165900, 0.0, 0.0, 25.0);
  306. CreateObject(11444, 2768.49023400, 709.92504800, 52.97165200, 0.0, 0.0, 855.0);
  307. CreateObject(652, 2774.67041000, 707.79986500, 52.97165200, 0.0, 0.0, 0.0);
  308. CreateObject(11457, 2761.46337800, 730.24603200, 52.48065100, 0.0, 0.0, 315.0);
  309. CreateObject(12957, 2783.13354400, 691.33044400, 53.57165900, 0.0, 0.0, 25.0);
  310. CreateObject(11444, 2783.49023400, 724.92504800, 52.97165200, 0.0, 0.0, 855.0);
  311. CreateObject(11444, 2801.49023400, 709.92504800, 52.97165200, 0.0, 0.0, 1305.0);
  312. CreateObject(11444, 2798.25097600, 706.63476500, 52.97165200, 0.0, 0.0, 1305.0);
  313. CreateObject(11440, 2810.27368100, 723.09515300, 52.44635300, 0.0, 0.0, 315.0);
  314. CreateObject(11440, 2806.97338800, 739.39508000, 52.44635300, 0.0, 0.0, 495.0);
  315. CreateObject(11444, 2828.21118100, 736.38085900, 52.97947300, 0.0, 0.0, 45.0);
  316. CreateObject(12843, 2795.01196200, 658.08679100, 52.95166000, 0.0, 0.0, 135.0);
  317. CreateObject(12844, 2797.11108300, 655.97656200, 54.92166100, 0.0, 0.0, 135.0);
  318. CreateObject(11440, 2830.97338800, 713.39508000, 52.44635300, 0.0, 0.0, 495.0);
  319. CreateObject(1305, 2773.34204100, 769.68072500, 52.97165600, 0.0, 0.0, 0.0);
  320. CreateObject(652, 2827.09204100, 681.75653000, 51.98309700, 0.0, 0.0, 0.0);
  321. CreateObject(652, 2817.87670800, 682.25921600, 52.60937500, 0.0, 0.0, 0.0);
  322. CreateObject(652, 2807.04882800, 687.34802200, 52.76060800, 0.0, 0.0, 0.0);
  323. CreateObject(652, 2795.70434500, 681.49902300, 51.95709600, 0.0, 0.0, 0.0);
  324. CreateObject(652, 2804.82348600, 679.17504800, 52.12999300, 0.0, 0.0, 0.0);
  325. CreateObject(652, 2812.30590800, 668.81860300, 51.98659800, 0.0, 0.0, 0.0);
  326. CreateObject(652, 2813.85229400, 696.68530200, 52.15110300, 0.0, 0.0, 0.0);
  327. CreateObject(2753, 2795.57250900, 655.02502400, 54.19863500, 0.0, 0.0, 135.0);
  328. CreateObject(11440, 2839.97338800, 667.79498200, 52.44635300, 0.0, 0.0, 495.0);
  329. CreateObject(2753, 2792.57250900, 658.02502400, 54.19863500, 0.0, 0.0, 135.0);
  330. CreateObject(3644, 2864.99462800, 627.58435000, 55.38677900, 0.0, 0.0, 315.0);
  331. CreateObject(2645, 2793.67211900, 662.12402300, 54.35165700, 0.0, 0.0, 45.0);
  332. CreateObject(2682, 2798.70825100, 659.65576100, 53.95175900, 0.0, 0.0, 0.0);
  333. CreateObject(2682, 2800.70825100, 656.35577300, 53.95175900, 0.0, 0.0, 180.0);
  334. CreateObject(2646, 2792.80151300, 661.29046600, 54.35166100, 0.0, 0.0, 45.0);
  335. CreateObject(11444, 2787.75048800, 666.13476500, 52.97165600, 0.0, 0.0, 1395.0);
  336. CreateObject(11444, 2782.75048800, 671.13476500, 52.97165600, 0.0, 0.0, 1395.0);
  337. CreateObject(11440, 2770.97338800, 655.59503100, 52.44635300, 0.0, 0.0, 945.0);
  338. CreateObject(10831, 2729.00146400, 600.67413300, 57.70510800, 0.0, 0.0, 135.0);
  339. CreateObject(1411, 2749.34082000, 611.73529000, 54.13188900, 0.0, 0.0, 315.0);
  340. CreateObject(1411, 2745.64086900, 615.43530200, 54.13188900, 0.0, 0.0, 315.0);
  341. CreateObject(1411, 2741.94116200, 619.13537500, 54.13188900, 0.0, 0.0, 315.0);
  342. CreateObject(11444, 2777.95068300, 661.73510700, 52.69165800, 0.0, 0.0, 1485.0);
  343. CreateObject(1411, 2738.24145500, 622.83544900, 54.13188900, 0.0, 0.0, 315.0);
  344. CreateObject(1411, 2734.54174800, 626.53552200, 54.13188900, 0.0, 0.0, 315.0);
  345. CreateObject(652, 2788.76074200, 641.30853200, 51.95166000, 0.0, 0.0, 0.0);
  346. CreateObject(1411, 2730.84204100, 630.23559500, 54.13188900, 0.0, 0.0, 315.0);
  347. CreateObject(1411, 2727.14233300, 633.93566800, 54.13188900, 0.0, 0.0, 315.0);
  348. CreateObject(652, 2799.60717700, 625.05908200, 51.92166100, 0.0, 0.0, 0.0);
  349. CreateObject(1411, 2723.44238200, 637.63568100, 54.13188900, 0.0, 0.0, 315.0);
  350. CreateObject(1411, 2719.74243100, 641.33569300, 54.13188900, 0.0, 0.0, 315.0);
  351. CreateObject(1411, 2716.04248000, 645.03570500, 54.13188900, 0.0, 0.0, 315.0);
  352. CreateObject(1411, 2712.34252900, 648.73571700, 54.13188900, 0.0, 0.0, 315.0);
  353. CreateObject(1411, 2708.64257800, 652.43572900, 54.13188900, 0.0, 0.0, 315.0);
  354. CreateObject(3644, 2784.95141600, 600.37988200, 55.43309400, 0.0, 0.0, 225.0);
  355. CreateObject(1411, 2704.94262600, 656.13574200, 54.13188900, 0.0, 0.0, 315.0);
  356. CreateObject(3594, 2792.79663000, 717.10028000, 53.37165800, 0.0, 0.0, 30.0);
  357. CreateObject(1411, 2703.44287100, 660.73577800, 54.13188900, 0.0, 0.0, 265.0);
  358. CreateObject(2453, 2791.32348600, 659.10070800, 54.34243000, 0.0, 0.0, 45.0);
  359. CreateObject(864, 2793.66650300, 646.96276800, 52.55166600, 0.0, 0.0, 0.0);
  360. CreateObject(1411, 2753.04077100, 608.03527800, 54.13188900, 0.0, 0.0, 315.0);
  361. CreateObject(865, 2846.77783200, 758.19305400, 52.77947200, 0.0, 0.0, 40.0);
  362. CreateObject(1411, 2764.14062500, 596.93524100, 54.13188900, 0.0, 0.0, 315.0);
  363. CreateObject(1411, 2767.84057600, 593.23522900, 54.13188900, 0.0, 0.0, 315.0);
  364. CreateObject(1411, 2771.54052700, 589.53521700, 54.13188900, 0.0, 0.0, 315.0);
  365. CreateObject(1411, 2775.24047800, 585.83520500, 54.13188900, 0.0, 0.0, 315.0);
  366. CreateObject(1411, 2778.94042900, 582.13519200, 54.13188900, 0.0, 0.0, 315.0);
  367. CreateObject(1411, 2782.64038000, 578.43518000, 54.13188900, 0.0, 0.0, 315.0);
  368. CreateObject(864, 2786.63720700, 644.09234600, 52.55166200, 0.0, 0.0, 0.0);
  369. CreateObject(864, 2797.41772400, 627.62609800, 52.52499700, 0.0, 0.0, 0.0);
  370. CreateObject(864, 2816.02514600, 679.00598100, 53.24594100, 0.0, 0.0, 0.0);
  371. CreateObject(864, 2810.74926700, 692.75482100, 53.15884700, 0.0, 0.0, 0.0);
  372. CreateObject(864, 2802.86596600, 683.43292200, 52.74193500, 0.0, 0.0, 0.0);
  373. CreateObject(864, 2806.69091700, 673.94738700, 52.60963800, 0.0, 0.0, 0.0);
  374. CreateObject(864, 2810.83959900, 681.85461400, 53.29870600, 0.0, 0.0, 0.0);
  375. CreateObject(864, 2823.59252900, 688.34338300, 52.63450600, 0.0, 0.0, 0.0);
  376. CreateObject(864, 2825.02490200, 677.06146200, 52.57154000, 0.0, 0.0, 0.0);
  377. CreateObject(1411, 2786.34033200, 574.73516800, 54.13188900, 0.0, 0.0, 315.0);
  378. CreateObject(864, 2811.21337800, 663.72509700, 52.55318400, 0.0, 0.0, 0.0);
  379. CreateObject(1411, 2790.44067300, 571.79479900, 54.13188900, 0.0, 0.0, 335.0);
  380. CreateObject(864, 2789.96459900, 715.92779500, 52.57165900, 0.0, 0.0, 0.0);
  381. CreateObject(968, 2761.45483300, 599.59161300, 53.62166500, 0.0, 15.0, 135.0);
  382. CreateObject(865, 2817.98095700, 739.87432800, 53.32057500, 0.0, 0.0, 0.0);
  383. CreateObject(966, 2761.45336900, 599.59735100, 52.92166100, 0.0, 0.0, -45.0);
  384. CreateObject(865, 2813.97900300, 688.24835200, 53.44382000, 0.0, 0.0, 0.0);
  385. CreateObject(865, 2800.57495100, 679.14575100, 52.75166300, 0.0, 0.0, 0.0);
  386. CreateObject(865, 2819.46801700, 675.09393300, 52.96518700, 0.0, 0.0, 0.0);
  387. CreateObject(865, 2812.75512600, 679.38824400, 53.36545100, 0.0, 0.0, 0.0);
  388. CreateObject(865, 2813.04296800, 665.91247500, 52.76364100, 0.0, 0.0, 0.0);
  389. CreateObject(865, 2787.46313400, 720.31250000, 52.77165600, 0.0, 0.0, 0.0);
  390. CreateObject(865, 2784.34252900, 641.24102700, 52.75166300, 0.0, 0.0, 0.0);
  391. CreateObject(865, 2791.73486300, 651.50836100, 52.75166300, 0.0, 0.0, 0.0);
  392. CreateObject(11440, 2762.97338800, 622.59503100, 52.44635300, 0.0, 0.0, 1035.0);
  393. CreateObject(865, 2842.44873000, 591.38769500, 52.99128700, 0.0, 0.0, 0.0);
  394. CreateObject(11457, 2759.41284100, 638.89495800, 52.44635300, 0.0, 0.0, 1755.0);
  395. CreateObject(865, 2846.55322200, 653.15997300, 53.32958900, 0.0, 0.0, 0.0);
  396. CreateObject(11444, 2741.55664000, 628.40869100, 52.82066700, 0.0, 0.0, 135.0);
  397. CreateObject(865, 2822.94409100, 653.89477500, 52.86015700, 0.0, 0.0, 0.0);
  398. CreateObject(865, 2866.17041000, 668.51715000, 52.85166100, 0.0, 0.0, 0.0);
  399. CreateObject(11444, 2756.55664000, 613.40869100, 52.82066700, 0.0, 0.0, 225.0);
  400. CreateObject(865, 2836.07202100, 700.85589500, 53.06813800, 0.0, 0.0, 0.0);
  401. CreateObject(11444, 2748.55664000, 621.40869100, 52.82066700, 0.0, 0.0, 225.0);
  402. CreateObject(12957, 2709.07299800, 671.37628100, 53.45166700, 0.0, 0.0, 90508.0);
  403. CreateObject(865, 2713.10522400, 673.64361500, 52.85166100, 0.0, 0.0, 0.0);
  404. CreateObject(865, 2708.57617100, 696.62133700, 52.85166100, 0.0, 0.0, 0.0);
  405. CreateObject(18234, 2713.96606400, 623.96081500, 52.82166200, 0.0, 0.0, 135.0);
  406. CreateObject(865, 2731.72973600, 701.18151800, 53.22451700, 0.0, 0.0, 0.0);
  407. CreateObject(3644, 2757.95532200, 681.32312000, 55.61631000, 0.0, 0.0, -405.0);
  408. CreateObject(865, 2724.11572200, 704.32818600, 52.82978800, 0.0, 0.0, 0.0);
  409. CreateObject(11440, 2744.27368100, 707.09515300, 52.44635300, 0.0, 0.0, 45.0);
  410. CreateObject(865, 2716.23657200, 708.28460600, 52.77499000, 0.0, 0.0, 0.0);
  411. CreateObject(865, 2723.92358300, 714.84252900, 53.16947100, 0.0, 0.0, 0.0);
  412. CreateObject(652, 2731.81469700, 692.81323200, 51.98783100, 0.0, 0.0, 0.0);
  413. CreateObject(652, 2721.56396400, 711.21185300, 52.08125300, 0.0, 0.0, 0.0);
  414. CreateObject(652, 2731.65283200, 725.96075400, 52.12599100, 0.0, 0.0, 0.0);
  415. CreateObject(11444, 2710.74194300, 725.02252100, 52.87633800, 0.0, 0.0, 135.0);
  416. CreateObject(12957, 2705.79614200, 719.05303900, 53.57165500, 0.0, 0.0, -20.0);
  417. CreateObject(652, 2703.96606400, 715.06060700, 51.97165600, 0.0, 0.0, 0.0);
  418. CreateObject(865, 2706.17529200, 721.22882000, 52.77165600, 0.0, 0.0, 0.0);
  419. CreateObject(3279, 2757.27783200, 590.04449400, 53.01220700, 0.0, 0.0, 675.0);
  420. CreateObject(11436, 2855.63452100, 727.90753100, 52.84145700, 0.0, 0.0, 225.0);
  421. CreateObject(3887, 2872.53222600, 590.95849600, 60.79167100, 0.0, 0.0, 315.0);
  422. CreateObject(11444, 2770.12500000, 762.82366900, 52.77947200, 0.0, 0.0, 135.0);
  423. CreateObject(11444, 2800.12500000, 757.82366900, 52.77947200, 0.0, 0.0, 495.0);
  424. CreateObject(11444, 2786.12500000, 765.82366900, 52.77947200, 0.0, 0.0, 765.0);
  425. CreateObject(11444, 2888.62182600, 694.79119800, 52.45166000, 0.0, 0.0, 585.0);
  426. CreateObject(11444, 2875.62182600, 709.79119800, 52.45166000, 0.0, 0.0, 675.0);
  427. CreateObject(11444, 2719.74194300, 736.52252100, 52.87633800, 0.0, 0.0, 405.0);
  428. CreateObject(11440, 2833.77368100, 755.09515300, 52.44635300, 0.0, 0.0, 585.0);
  429. CreateObject(11444, 2822.21118100, 764.38085900, 52.97947300, 0.0, 0.0, 315.0);
  430. CreateObject(11440, 2851.97338800, 710.39508000, 52.44635300, 0.0, 0.0, 495.0);
  431. CreateObject(11444, 2839.19458000, 692.58001700, 52.85166100, 0.0, 0.0, 495.0);
  432. CreateObject(11444, 2835.66601500, 584.42199700, 52.49480000, 0.0, 0.0, 45.0);
  433. CreateObject(11444, 2825.66601500, 597.42199700, 52.79479500, 0.0, 0.0, 135.0);
  434. CreateObject(11444, 2828.66601500, 609.42199700, 52.79479500, 0.0, 0.0, 135.0);
  435. CreateObject(11444, 2838.66601500, 616.42199700, 52.79479500, 0.0, 0.0, 225.0);
  436. CreateObject(3271, 2733.82373000, 658.61834700, 53.58201200, -2.0, 0.0, 6.0);
  437. CreateObject(11441, 2749.69311500, 655.08966000, 53.25597300, 0.0, 0.0, 315.0);
  438. CreateObject(11442, 2715.46142500, 655.27111800, 52.89888700, 0.0, 0.0, 225.0);
  439. CreateObject(11443, 2742.18554600, 656.15722600, 53.85850900, 0.0, 0.0, 225.0);
  440. CreateObject(11440, 2814.87548800, 579.05432100, 52.44979800, 0.0, 0.0, 45.0);
  441. CreateObject(3279, 2709.27783200, 638.04449400, 53.01220700, 0.0, 0.0, 675.0);
  442. CreateObject(11444, 2826.66601500, 575.42199700, 52.79479500, 0.0, 0.0, 45.0);
  443. CreateObject(11444, 2798.66601500, 576.42199700, 52.79479500, 0.0, 0.0, 45.0);
  444. CreateObject(11440, 2832.97338800, 648.79498200, 52.44635300, 0.0, 0.0, 585.0);
  445. CreateObject(11444, 2854.51074200, 655.78869600, 52.96088400, 0.0, 0.0, 225.0);
  446. CreateObject(11444, 2741.34912100, 734.59539700, 52.95130500, 0.0, 0.0, 45.0);
  447. CreateObject(11436, 2818.93066400, 618.14050200, 52.88425000, 0.0, 0.0, -45.0);
  448. CreateObject(11444, 2820.50341700, 631.79907200, 52.81610100, 0.0, 0.0, 135.0);
  449. CreateObject(12957, 2823.63208000, 656.17840500, 53.55007100, 3.0, 0.0, 288.0);
  450. CreateObject(652, 2827.32641600, 652.77709900, 51.95696600, 0.0, 0.0, 0.0);
  451. CreateObject(652, 2838.52124000, 597.80249000, 52.45552800, 0.0, 0.0, 0.0);
  452. CreateObject(652, 2805.38574200, 569.99420100, 52.08781000, 0.0, 0.0, 0.0);
  453. CreateObject(652, 2891.04125900, 591.41516100, 52.23813600, 0.0, 0.0, 0.0);
  454. CreateObject(652, 2883.28930600, 704.45068300, 51.97758400, 0.0, 0.0, 0.0);
  455. CreateObject(652, 2827.61572200, 762.88586400, 51.97165600, 0.0, 0.0, 0.0);
  456. CreateObject(652, 2723.56665000, 763.92230200, 52.48421000, 0.0, 0.0, 0.0);
  457. CreateObject(652, 2769.17065400, 741.54406700, 52.15418200, 0.0, 0.0, 0.0);
  458. CreateObject(652, 2750.01611300, 734.58581500, 52.12576600, 0.0, 0.0, 0.0);
  459. CreateObject(652, 2708.97167900, 677.26422100, 51.95166000, 0.0, 0.0, 0.0);
  460. CreateObject(652, 2796.39746000, 768.11395200, 51.97946900, 0.0, 0.0, 0.0);
  461. CreateObject(652, 2842.27734300, 719.09863200, 52.24139400, 0.0, 0.0, 0.0);
  462. CreateObject(865, 2766.10864200, 739.05279500, 53.34673300, 0.0, 0.0, 0.0);
  463. CreateObject(865, 2751.11499000, 741.69329800, 53.31208000, 0.0, 0.0, 0.0);
  464. CreateObject(865, 2719.85644500, 760.46685700, 52.87165800, 0.0, 0.0, 0.0);
  465. CreateObject(865, 2731.25463800, 758.86065600, 52.87165800, 0.0, 0.0, 0.0);
  466. CreateObject(865, 2749.49243100, 762.54290700, 52.87165800, 0.0, 0.0, 0.0);
  467. CreateObject(865, 2776.40429600, 771.13366600, 52.87165800, 0.0, 0.0, 0.0);
  468. CreateObject(865, 2807.48437500, 769.96972600, 52.87947000, 0.0, 0.0, 0.0);
  469. CreateObject(865, 2838.51269500, 722.68103000, 53.27966600, 0.0, 0.0, 0.0);
  470. CreateObject(865, 2884.54589800, 701.60443100, 52.88711500, 0.0, 0.0, 0.0);
  471. CreateObject(865, 2776.40429600, 771.13366600, 52.87165800, 0.0, 0.0, 0.0);
  472. CreateObject(865, 2807.48437500, 769.96972600, 52.87947000, 0.0, 0.0, 0.0);
  473. CreateObject(1305, 2774.34204100, 771.68072500, 52.97165600, 0.0, 0.0, 0.0);
  474. CreateObject(1305, 2775.34204100, 772.68072500, 53.97165600, 0.0, 0.0, 0.0);
  475. CreateObject(16500, 2800.26025300, 660.77447500, 60.25634700, 0.0, 360.0, 495.0);
  476. CreateObject(16500, 2800.16015600, 660.87445000, 60.25634700, 0.0, 360.0, 675.0);
  477. Textdraw0 = TextDrawCreate(496.000000, 122.000000, "~g~Soldados: ~w~0");
  478. TextDrawBackgroundColor(Textdraw0, 255);
  479. TextDrawFont(Textdraw0, 1);
  480. TextDrawLetterSize(Textdraw0, 0.490000, 2.300000);
  481. TextDrawColor(Textdraw0, blue);
  482. TextDrawSetOutline(Textdraw0, 0);
  483. TextDrawSetProportional(Textdraw0, 1);
  484. TextDrawSetShadow(Textdraw0, 1);
  485.  
  486. Textdraw1 = TextDrawCreate(489.000000, 150.000000, "~r~Terroristas: ~w~0");
  487. TextDrawBackgroundColor(Textdraw1, 255);
  488. TextDrawFont(Textdraw1, 1);
  489. TextDrawLetterSize(Textdraw1, 0.490000, 2.300000);
  490. TextDrawColor(Textdraw1, red);
  491. TextDrawSetOutline(Textdraw1, 0);
  492. TextDrawSetProportional(Textdraw1, 1);
  493. TextDrawSetShadow(Textdraw1, 1);
  494.  
  495.  
  496.  
  497. return 1;
  498. }
  499.  
  500. public OnGameModeExit()
  501. {
  502. DestroyTree( );
  503. TextDrawHideForAll ( Textdraw0 ) ;
  504. TextDrawDestroy ( Textdraw0 ) ;
  505. TextDrawHideForAll ( Textdraw1 ) ;
  506. TextDrawDestroy ( Textdraw1 ) ;
  507. TextDrawHideForAll ( Textdraw3 ) ;
  508. TextDrawDestroy ( Textdraw3 ) ;
  509. TextDrawDestroy(Mission);
  510. TextDrawDestroy(ArmyO);
  511. TextDrawDestroy(TerriostO);
  512. return 1;
  513. }
  514.  
  515.  
  516.  
  517. public ScoreChecker(playerid)
  518. {
  519. if ( TerroristKills >= 35 ) {
  520. if(gTeam[playerid] == TEAM_Terrorist)
  521. {
  522. GivePlayerMoney(playerid,1000);
  523. SetPlayerScore(playerid, GetPlayerScore(playerid) + 3);
  524. TerroristKills = 0 ;
  525. ArmyKills = 0 ;
  526. GameTextForAll ( " ~r~The Army has terminated the Terrorists" , 6000 , 5 ) ;
  527. }
  528. }
  529.  
  530. if ( ArmyKills >= 35 ) {
  531. if(gTeam[playerid] == TEAM_Army)
  532. {
  533. GivePlayerMoney(playerid,1000);
  534. SetPlayerScore(playerid, GetPlayerScore(playerid) + 3);
  535. TerroristKills = 0 ;
  536. ArmyKills = 0 ;
  537. GameTextForAll ( " ~r~The Army has terminated the Terrorists" , 6000 , 5 ) ;
  538. }
  539. }
  540. return 1;
  541. }
  542.  
  543.  
  544. public ScoreUpdater(playerid)
  545. {
  546. new string[ 100 ] ;
  547. format ( string , sizeof ( string ) , " ~g~Soldados: ~w~%s " , ArmyKills ) ;
  548. TextDrawSetString ( Textdraw0 , string ) ;
  549. new string2 [ 100 ] ;
  550. format ( string2 , sizeof ( string2 ) , " ~r~Terroristas: ~w~%s " , TerroristKills ) ;
  551. TextDrawSetString ( Textdraw1 , string2 ) ;
  552. return 1;
  553. }
  554.  
  555. public OnPlayerDeath(playerid, killerid, reason)
  556. {
  557. SendDeathMessage ( killerid , playerid , reason ) ;
  558. SetPlayerScore ( killerid , GetPlayerScore( killerid ) +1 ) ;
  559. SetPlayerColor(playerid, COLOR_GREY);
  560. if (gTeam[playerid]==TEAM_Army)
  561. {
  562. Sgangsta++;
  563. }
  564. if(gTeam[playerid]==TEAM_Terrorist)
  565. {
  566. Scop++;
  567. }
  568. new string1[5], string[5];
  569. valstr(string, Scop);
  570. TextDrawSetString(TextCp, string);
  571. valstr(string1, Sgangsta);
  572. TextDrawSetString(TextGa, string1);
  573.  
  574. if(Scop==0)
  575. {
  576. for(new i=0; i < MAX_PLAYERS; i++)
  577. {
  578. if (gTeam[playerid]==TEAM_Army)
  579. {
  580. }
  581. if(gTeam[playerid]==TEAM_Terrorist)
  582. {
  583. GivePlayerMoney(playerid,1000);
  584. SetPlayerScore(playerid, GetPlayerScore(playerid) + 3);
  585. TerroristKills = 0 ;
  586. ArmyKills = 0 ;
  587. GameTextForAll ( " ~r~The Terrorists have terminated the Army" , 6000 , 5 ) ;
  588. SendClientMessageToAll(COLOR_GREEN, "The Terrorists have terminated the Army");
  589. SetTimer("Finsh",6000,false);
  590. }
  591. new string2[5];
  592. valstr(string2, Scop);
  593. TextDrawSetString(TextCp, string2);
  594. valstr(string2, Sgangsta);
  595. TextDrawSetString(TextGa, string2);
  596. }
  597. }
  598.  
  599. if(Sgangsta==0)
  600. {
  601. for(new i=0; i < MAX_PLAYERS; i++)
  602. {
  603. if (gTeam[playerid]==TEAM_Army)
  604. {
  605. GivePlayerMoney(playerid,1000);
  606. SetPlayerScore(playerid, GetPlayerScore(playerid) + 3);
  607. TerroristKills = 0 ;
  608. ArmyKills = 0 ;
  609. GameTextForAll ( " ~r~The Army has terminated the Terrorists" , 6000 , 5 ) ;
  610. SendClientMessageToAll(COLOR_GREEN, "The Terrorists have terminated the Army");
  611. SetTimer("Finsh",6000,false);
  612. }
  613. if(gTeam[playerid]==TEAM_Terrorist)
  614. {
  615. }
  616. new string2[5];
  617. valstr(string2, Scop);
  618. TextDrawSetString(TextCp, string2);
  619. valstr(string2, Sgangsta);
  620. TextDrawSetString(TextGa, string2);
  621. }
  622. }
  623. return 1;
  624. }
  625.  
  626.  
  627. public OnPlayerRequestSpawn(playerid)
  628. {
  629. new team1count, team2count;
  630. for(new i, m = GetMaxPlayers(); i < m; i++)
  631. {
  632. if (IsPlayerConnected(i))
  633. {
  634. if (gTeam[i] == TEAM_Army) team1count++;
  635. else if (gTeam[i] == TEAM_Terrorist) team2count++;
  636. }
  637. }
  638. if (gTeam[playerid] == TEAM_Army)
  639. {
  640. if (team1count > (team2count+1)){
  641. SendClientMessage(playerid, COLOR_YELLOW, "This team is full, please choose the other one.");
  642. return 0;
  643. }
  644.  
  645. }
  646. else if (gTeam[playerid] == TEAM_Terrorist)
  647. {
  648. if ((team1count+1) < team2count){
  649. SendClientMessage(playerid, COLOR_YELLOW, "This team is full, please choose the other one.");
  650. return 0;
  651. }
  652. }
  653. return 1;
  654. }
  655. forward balanced(playerid);
  656. public balanced(playerid)
  657. {
  658. TextDrawHideForPlayer(playerid, textdraw12);
  659. return 1;
  660. }
  661.  
  662.  
  663.  
  664.  
  665. public OnPlayerRequestClass(playerid, classid)
  666. {
  667. SetPlayerPos(playerid,-227.15220642,2662.48730469,62.26383972);
  668. SetPlayerCameraPos(playerid, -216.19187927,2663.92211914,62.25078964);
  669. SetPlayerCameraLookAt(playerid, -227.15220642,2662.48730469,62.26383972);
  670.  
  671. if ( classid == 1 )
  672. {
  673. GameTextForPlayer(playerid,"~g~Soldados",1000,5);
  674. gTeam[playerid] = TEAM_Army;
  675.  
  676. }
  677. if ( classid == 0 )
  678. {
  679. GameTextForPlayer(playerid,"~r~Terroristas",1000,5);
  680. gTeam[playerid] = TEAM_Terrorist;
  681. }
  682.  
  683.  
  684. return 1;
  685. }
  686.  
  687.  
  688. public AnnounceWinner(playerid)
  689. {
  690. if(Sgangsta > Scop)
  691. {
  692. for(new i = 0; i < MAX_PLAYERS; i++)
  693. {
  694. if(IsPlayerConnected(i))
  695. {
  696. if (gTeam[i] == TEAM_Terrorist)
  697. {
  698. GameTextForPlayer(i, "~y~Mision Completada", 6000, 4);
  699. GivePlayerMoney(i, 3000);
  700. SetPlayerScore(i,GetPlayerScore(i)+3);
  701. SetPlayerCameraPos(i, 2729.3452,627.7751,53.9227);
  702. PlayerPlaySound(playerid, 1185, 0, 0, 0);
  703. SetPlayerCameraLookAt(i, 2761.2925,658.2138,53.9517);
  704. }
  705. if (gTeam[i] == TEAM_Army)
  706. {
  707. GameTextForPlayer(i, "~r~Mision Fallecida", 6000, 4);
  708. SetPlayerCameraPos(i, 2729.3452,627.7751,53.9227);
  709. PlayerPlaySound(playerid, 1185, 0, 0, 0);
  710. SetPlayerCameraLookAt(i, 2761.2925,658.2138,53.9517);
  711. }
  712.  
  713. }
  714. }
  715. }
  716. if(Scop > Sgangsta)
  717. {
  718. for(new i = 0; i < MAX_PLAYERS; i++)
  719. {
  720. if(IsPlayerConnected(i))
  721. {
  722. if (gTeam[playerid] == TEAM_Army)
  723. {
  724. GameTextForPlayer(i, "~g~ Mission Completada", 6000, 4);
  725. GivePlayerMoney(i, 3000);
  726. SetPlayerScore(i,GetPlayerScore(i)+3);
  727. SetPlayerCameraPos(i, 2729.3452,627.7751,53.9227);
  728. PlayerPlaySound(playerid, 1185, 0, 0, 0);
  729. SetPlayerCameraLookAt(i, 2761.2925,658.2138,53.9517);
  730. }
  731. if (gTeam[playerid] == TEAM_Terrorist)
  732. {
  733. GameTextForPlayer(i, "~r~ Mission Fallecida", 6000, 4);
  734. SetPlayerCameraPos(i, 2729.3452,627.7751,53.9227);
  735. PlayerPlaySound(playerid, 1185, 0, 0, 0);
  736. SetPlayerCameraLookAt(i, 2761.2925,658.2138,53.9517);
  737. }
  738.  
  739. }
  740. }
  741. }
  742. if(Scop == Sgangsta)
  743. {
  744. for(new i = 0; i < MAX_PLAYERS; i++)
  745. {
  746. if(IsPlayerConnected(i))
  747. {
  748. GameTextForAll("~y~ DRAW",3000,5);
  749. SetPlayerCameraPos(i, 2729.3452,627.7751,53.9227);
  750. PlayerPlaySound(playerid, 1185, 0, 0, 0);
  751. SetPlayerCameraLookAt(i, 2761.2925,658.2138,53.9517);
  752. }
  753. }
  754. }
  755. SetTimer("Finsh",8000,0);
  756. return 1;
  757. }
  758.  
  759. public OnPlayerConnect(playerid)
  760. {
  761. TextDrawShowForAll(TextCp); TextDrawShowForAll(TextGa); TextDrawShowForAll(Textdraw2); TextDrawShowForAll(Textdraw3);
  762. PlayerPlaySound(playerid, 1186, 0, 0, 0);
  763. return 1;
  764. }
  765.  
  766. public OnPlayerDisconnect(playerid, reason)
  767. {
  768. TextDrawHideForPlayer(playerid, Mission);
  769. return 1;
  770. }
  771.  
  772.  
  773. forward Next(playerid);
  774. public Next(playerid)
  775. {
  776. SendClientMessageToAll(COLOR_YELLOW, "Siguiente mision will be Parkour!");
  777. return 1;
  778. }
  779.  
  780. forward Finsh(playerid);
  781. public Finsh(playerid)
  782. {
  783. PlayerPlaySound(playerid, 1130, 0.0, 0.0, 10.0);
  784. GameTextForPlayer(playerid,"~y~Cargando Mision...",6000,0);
  785. SendRconCommand("changemode BMX");
  786. return 1;
  787. }
  788.  
  789. public OnPlayerSpawn(playerid)
  790. {
  791. if(gTeam[playerid] == TEAM_Army)
  792. {
  793. SetArmyTeamSetUp(playerid);
  794. TextDrawShowForPlayer(playerid,ArmyO);
  795. TogglePlayerControllable(playerid,0);
  796. TogglePlayerControllable(playerid,1);
  797. }
  798. if(gTeam[playerid] == TEAM_Terrorist)
  799. {
  800. SetTerroristTeamSetUp(playerid);
  801. TextDrawShowForPlayer(playerid,TerriostO);
  802. TogglePlayerControllable(playerid,0);
  803. TogglePlayerControllable(playerid,1);
  804. }
  805. TextDrawShowForAll(TextCp); TextDrawShowForAll(TextGa); TextDrawShowForAll(Textdraw2); TextDrawShowForAll(Textdraw3);
  806. return 1;
  807. }
  808.  
  809.  
  810.  
  811. public OnVehicleSpawn(vehicleid)
  812. {
  813. return 1;
  814. }
  815.  
  816. public OnVehicleDeath(vehicleid, killerid)
  817. {
  818. return 1;
  819. }
  820.  
  821. public OnPlayerText(playerid, text[])
  822. {
  823. return 1;
  824. }
  825.  
  826. public OnPlayerCommandText(playerid, cmdtext[])
  827. {
  828. if (strcmp("/awin", cmdtext, true, 10) == 0)
  829. {
  830. ArmyKills += 35 ;
  831. SendClientMessage(playerid, red, "You let the army win!");
  832. return 1;
  833. }
  834. return 0;
  835. }
  836.  
  837.  
  838. public
  839. UpdateTree( )
  840. {
  841. TextDrawColor( Text:ChristmasTree[ 10 ], RGBA ( RedValue , GreenValue , BlueValue , 255 ) );
  842. TextDrawColor( Text:ChristmasTree[ 11 ], RGBA ( RedValue , GreenValue , BlueValue , 255 ) );
  843. TextDrawBackgroundColor( Text:ChristmasTree[ 10 ], RGBA ( RedValue , GreenValue , BlueValue , 255 ) );
  844. TextDrawBackgroundColor( Text:ChristmasTree[ 11 ], RGBA ( RedValue , GreenValue , BlueValue , 255 ) );
  845. TextDrawSetOutline( ChristmasTree[ 10 ], 1);
  846. TextDrawSetOutline( ChristmasTree[ 11 ], 1);
  847. }
  848. public
  849. ChangeColors( )
  850. {
  851. for ( new playerid = 0; playerid < MAX_PLAYERS; playerid++ )
  852. {
  853. if ( IsPlayerConnected( playerid ) )
  854. {
  855. if ( pTree[ playerid ] == false ) return 0;
  856. }
  857. }
  858. if ( Phase == 0 )
  859. {
  860. RedValue += 5;
  861. UpdateTree( );
  862. if ( RedValue == 255 )Phase = 1;
  863.  
  864. }
  865. else if ( Phase == 1 )
  866. {
  867. RedValue -= 5;
  868. BlueValue += 5;
  869.  
  870. if ( BlueValue == 255 )Phase = 2;
  871.  
  872. }
  873. else if ( Phase == 2 )
  874. {
  875. GreenValue += 5;
  876. BlueValue -= 5;
  877. if ( GreenValue == 255 )Phase = 3;
  878. }
  879. else if ( Phase == 3 )
  880. {
  881. RedValue += 5;
  882. GreenValue -= 5;
  883. if ( RedValue == 255 )Phase = 4;
  884. }
  885. else if ( Phase == 4 )
  886. {
  887. PhaseTimes += 1;
  888. if ( PhaseTimes == 1 )
  889. {
  890. TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
  891. TextDrawColor(ChristmasTree[ 16 ], -36561153);
  892. }
  893. if ( PhaseTimes == 2 )
  894. {
  895. TextDrawBackgroundColor(ChristmasTree[ 16 ], -36561153);
  896. TextDrawColor(ChristmasTree[ 16 ], -65281);
  897. }
  898. if ( PhaseTimes == 3 )
  899. {
  900. TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
  901. TextDrawColor(ChristmasTree[ 16 ], -36561153);
  902. }
  903. if ( PhaseTimes == 4 )
  904. {
  905. TextDrawBackgroundColor(ChristmasTree[ 16 ], -36561153);
  906. TextDrawColor(ChristmasTree[ 16 ], -65281);
  907. }
  908. if ( PhaseTimes == 5 )
  909. {
  910. TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
  911. TextDrawColor(ChristmasTree[ 16 ], -36561153);
  912. }
  913. if ( PhaseTimes == 6 )
  914. {
  915. TextDrawBackgroundColor(ChristmasTree[ 16 ], -36561153);
  916. TextDrawColor(ChristmasTree[ 16 ], -65281);
  917. }
  918. if ( PhaseTimes == 7 )
  919. {
  920. TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
  921. TextDrawColor(ChristmasTree[ 16 ], -36561153);
  922. }
  923. if ( PhaseTimes == 8 )
  924. {
  925. TextDrawBackgroundColor(ChristmasTree[ 16 ], -36561153);
  926. TextDrawColor(ChristmasTree[ 16 ], -65281);
  927. }
  928. if ( PhaseTimes == 9 )
  929. {
  930. TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
  931. TextDrawColor(ChristmasTree[ 16 ], -36561153);
  932. Phase = 1;
  933. PhaseTimes = 0;
  934. }
  935. }
  936. return 1;
  937. }
  938. public
  939. DestroyTree( )
  940. {
  941. for ( new i = 0; i < 22; i ++ ) TextDrawHideForAll( Text:ChristmasTree[ i ] ),
  942. TextDrawDestroy( Text:ChristmasTree[ i ] );
  943. }
  944.  
  945.  
  946.  
  947. public
  948. ShowTree( playerid )
  949. {
  950. }
  951.  
  952. forward AutoBalance(playerid);
  953. public AutoBalance(playerid)
  954. {
  955. //Use 'if' statement to see how many people on team, something like this
  956. if(gTeam[playerid] > MAX_TEAM_MEMBERS)
  957. {
  958. SetPlayerTeam(playerid,2); // Something like this should work.
  959. }
  960. return 1;
  961. }
  962.  
  963. public
  964. HideTree( playerid )
  965. {
  966. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 0 ] );
  967. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 1 ] );
  968. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 2 ] );
  969. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 3 ] );
  970. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 4 ] );
  971. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 5 ] );
  972. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 6 ] );
  973. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 7 ] );
  974. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 8 ] );
  975. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 9 ] );
  976. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 10 ] );
  977. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 11 ] );
  978. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 12 ] );
  979. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 13 ] );
  980. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 14 ] );
  981. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 15 ] );
  982. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 16 ] );
  983. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 17 ] );
  984. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 18 ] );
  985. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 19 ] );
  986. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 20 ] );
  987. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 21 ] );
  988. TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 22 ] );
  989. }
Advertisement
Add Comment
Please, Sign In to add comment