Day_Walker

Ayuda

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