Advertisement
F1N4L_

FS Minigame Gang A/D by F1N4L

Apr 18th, 2016
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.17 KB | None | 0 0
  1. /* ______________________________________
  2. |______FILTERSCRIPT_TK_MINIGAME______|
  3. |______________BY_F1N4L______________|
  4. |_______Initialized_16_04_2016_______|
  5. |_________Updated_18_04_2016_________|
  6. |_______v_0.3z_v_0.3.7__v.1.3________|
  7. */
  8.  
  9. #include <a_samp>
  10. #include <streamer>
  11. #include <foreach>
  12. #include <zcmd>
  13.  
  14. #define MAX_PONTOS 3
  15. #define SHOW_NICK true
  16.  
  17. new
  18. PickupMode,
  19. bool:ComPickup[MAX_PLAYERS],
  20. bool:FoiMG[MAX_PLAYERS],
  21. bool:IniciouMG,
  22. Equipe[MAX_PLAYERS],
  23. Matou[MAX_PLAYERS],
  24. Morreu[MAX_PLAYERS],
  25. Capturou[MAX_PLAYERS],
  26. Contagem_Equipe_1,
  27. Contagem_Equipe_2,
  28. Pontos_Equipe_1,
  29. Pontos_Equipe_2,
  30. CP_Equipe_1,
  31. CP_Equipe_2,
  32. PlayerComDroga
  33. ;
  34.  
  35. new
  36. TimerAtualizar[MAX_PLAYERS]
  37. ;
  38.  
  39. new
  40. Text:TDEditor_TD[23],
  41. PlayerText:TDEditor_PTD[5]
  42. ;
  43.  
  44. new Float:RandomPickupSpawn[8][3] =
  45. {
  46. {1272.1404, 2781.9517, 10.8125},
  47. {1315.6337, 2848.9990, 10.8203},
  48. {1342.5803, 2780.3416, 10.3074},
  49. {1300.8009, 2732.1619, 10.8203},
  50. {1240.8817, 2756.2798, 10.8203},
  51. {1374.7561, 2827.0725, 10.8203},
  52. {1397.6188, 2729.2617, 10.8203},
  53. {1149.3634, 2812.5732, 10.8125}
  54. };
  55.  
  56. new Float:RandomEquipe2Spawn[5][3] =
  57. {
  58. {1135.5074, 2799.7400, 10.8203},
  59. {1143.1603, 2753.5933, 10.8203},
  60. {1161.8661, 2728.1257, 10.8203},
  61. {1148.1884, 2848.2947, 10.8203},
  62. {1165.3192, 2810.1648, 10.8203}
  63. };
  64.  
  65. new Float:RandomEquipe1Spawn[5][3] =
  66. {
  67. {1399.3834, 2813.8564, 10.8203},
  68. {1389.5037, 2784.5581, 10.8203},
  69. {1391.1814, 2731.0261, 10.8203},
  70. {1399.7212, 2853.2241, 10.8203},
  71. {1413.3110, 2788.0364, 10.8203}
  72. };
  73.  
  74. public OnFilterScriptInit()
  75. {
  76. TDEditor_TD[0] = TextDrawCreate(247.646987, 1.583337, "_");
  77. TextDrawLetterSize(TDEditor_TD[0], 0.350588, 2.790001);
  78. TextDrawTextSize(TDEditor_TD[0], 421.000000, 0.000000);
  79. TextDrawAlignment(TDEditor_TD[0], 1);
  80. TextDrawColor(TDEditor_TD[0], -1);
  81. TextDrawUseBox(TDEditor_TD[0], 1);
  82. TextDrawBoxColor(TDEditor_TD[0], -16777126);
  83. TextDrawSetShadow(TDEditor_TD[0], 0);
  84. TextDrawBackgroundColor(TDEditor_TD[0], 0);
  85. TextDrawFont(TDEditor_TD[0], 1);
  86. TextDrawSetProportional(TDEditor_TD[0], 1);
  87.  
  88. TDEditor_TD[1] = TextDrawCreate(246.235351, 0.416660, "Equipe_1:_0_PONTOS");
  89. TextDrawLetterSize(TDEditor_TD[1], 0.400000, 1.600000);
  90. TextDrawAlignment(TDEditor_TD[1], 1);
  91. TextDrawColor(TDEditor_TD[1], -65281);
  92. TextDrawBackgroundColor(TDEditor_TD[1], 255);
  93. TextDrawFont(TDEditor_TD[1], 2);
  94. TextDrawSetProportional(TDEditor_TD[1], 1);
  95. TextDrawSetShadow(TDEditor_TD[1], 0);
  96.  
  97. TDEditor_TD[2] = TextDrawCreate(246.235351, 13.116674, "Equipe_2:_0_PONTOS");
  98. TextDrawLetterSize(TDEditor_TD[2], 0.400000, 1.600000);
  99. TextDrawAlignment(TDEditor_TD[2], 1);
  100. TextDrawColor(TDEditor_TD[2], -65281);
  101. TextDrawBackgroundColor(TDEditor_TD[2], 255);
  102. TextDrawFont(TDEditor_TD[2], 2);
  103. TextDrawSetProportional(TDEditor_TD[2], 1);
  104. TextDrawSetShadow(TDEditor_TD[2], 0);
  105.  
  106. TDEditor_TD[3] = TextDrawCreate(211.882202, 118.249954, "_");
  107. TextDrawLetterSize(TDEditor_TD[3], 0.399529, 1.280000);
  108. TextDrawTextSize(TDEditor_TD[3], 449.359375, -0.230000);
  109. TextDrawAlignment(TDEditor_TD[3], 1);
  110. TextDrawColor(TDEditor_TD[3], -40705);
  111. TextDrawUseBox(TDEditor_TD[3], 1);
  112. TextDrawBoxColor(TDEditor_TD[3], -16777126);
  113. TextDrawBackgroundColor(TDEditor_TD[3], 255);
  114. TextDrawFont(TDEditor_TD[3], 1);
  115. TextDrawSetProportional(TDEditor_TD[3], 1);
  116. TextDrawSetShadow(TDEditor_TD[3], 0);
  117.  
  118. TDEditor_TD[4] = TextDrawCreate(210.941207, 112.416625, "RELATORIO_DA_PARTIDA");
  119. TextDrawLetterSize(TDEditor_TD[4], 0.499764, 2.165834);
  120. TextDrawAlignment(TDEditor_TD[4], 1);
  121. TextDrawColor(TDEditor_TD[4], 255);
  122. TextDrawBackgroundColor(TDEditor_TD[4], 255);
  123. TextDrawFont(TDEditor_TD[4], 2);
  124. TextDrawSetProportional(TDEditor_TD[4], 1);
  125. TextDrawSetShadow(TDEditor_TD[4], 0);
  126.  
  127. TDEditor_TD[5] = TextDrawCreate(211.911849, 134.000076, "_");
  128. TextDrawLetterSize(TDEditor_TD[5], 0.385411, 7.981667);
  129. TextDrawTextSize(TDEditor_TD[5], 322.000000, 0.000000);
  130. TextDrawAlignment(TDEditor_TD[5], 1);
  131. TextDrawColor(TDEditor_TD[5], -1);
  132. TextDrawUseBox(TDEditor_TD[5], 1);
  133. TextDrawBoxColor(TDEditor_TD[5], -16777126);
  134. TextDrawBackgroundColor(TDEditor_TD[5], 255);
  135. TextDrawFont(TDEditor_TD[5], 1);
  136. TextDrawSetProportional(TDEditor_TD[5], 1);
  137. TextDrawSetShadow(TDEditor_TD[5], 0);
  138.  
  139. TDEditor_TD[6] = TextDrawCreate(331.546234, 134.000076, "_");
  140. TextDrawLetterSize(TDEditor_TD[6], 0.385411, 7.981667);
  141. TextDrawTextSize(TDEditor_TD[6], 449.000000, 0.000000);
  142. TextDrawAlignment(TDEditor_TD[6], 1);
  143. TextDrawColor(TDEditor_TD[6], -1);
  144. TextDrawUseBox(TDEditor_TD[6], 1);
  145. TextDrawBoxColor(TDEditor_TD[6], -16777126);
  146. TextDrawBackgroundColor(TDEditor_TD[6], 255);
  147. TextDrawFont(TDEditor_TD[6], 1);
  148. TextDrawSetProportional(TDEditor_TD[6], 1);
  149. TextDrawSetShadow(TDEditor_TD[6], 0);
  150.  
  151. TDEditor_TD[7] = TextDrawCreate(231.647171, 130.500076, "EQUIPE_1");
  152. TextDrawLetterSize(TDEditor_TD[7], 0.400000, 1.600000);
  153. TextDrawAlignment(TDEditor_TD[7], 1);
  154. TextDrawColor(TDEditor_TD[7], 255);
  155. TextDrawBackgroundColor(TDEditor_TD[7], 255);
  156. TextDrawFont(TDEditor_TD[7], 2);
  157. TextDrawSetProportional(TDEditor_TD[7], 1);
  158. TextDrawSetShadow(TDEditor_TD[7], 0);
  159.  
  160. TDEditor_TD[8] = TextDrawCreate(354.000000, 130.500076, "EQUIPE_2");
  161. TextDrawLetterSize(TDEditor_TD[8], 0.400000, 1.600000);
  162. TextDrawAlignment(TDEditor_TD[8], 1);
  163. TextDrawColor(TDEditor_TD[8], 255);
  164. TextDrawBackgroundColor(TDEditor_TD[8], 255);
  165. TextDrawFont(TDEditor_TD[8], 2);
  166. TextDrawSetProportional(TDEditor_TD[8], 1);
  167. TextDrawSetShadow(TDEditor_TD[8], 0);
  168.  
  169. TDEditor_TD[9] = TextDrawCreate(212.823760, 151.500076, "MATOU:_0");
  170. TextDrawLetterSize(TDEditor_TD[9], 0.251294, 1.124998);
  171. TextDrawAlignment(TDEditor_TD[9], 1);
  172. TextDrawColor(TDEditor_TD[9], 255);
  173. TextDrawBackgroundColor(TDEditor_TD[9], 255);
  174. TextDrawFont(TDEditor_TD[9], 2);
  175. TextDrawSetProportional(TDEditor_TD[9], 1);
  176. TextDrawSetShadow(TDEditor_TD[9], 0);
  177.  
  178. TDEditor_TD[10] = TextDrawCreate(331.882568, 152.500076, "MATOU:_0");
  179. TextDrawLetterSize(TDEditor_TD[10], 0.251294, 1.124998);
  180. TextDrawAlignment(TDEditor_TD[10], 1);
  181. TextDrawColor(TDEditor_TD[10], 255);
  182. TextDrawBackgroundColor(TDEditor_TD[10], 255);
  183. TextDrawFont(TDEditor_TD[10], 2);
  184. TextDrawSetProportional(TDEditor_TD[10], 1);
  185. TextDrawSetShadow(TDEditor_TD[10], 0);
  186.  
  187. TDEditor_TD[11] = TextDrawCreate(332.353149, 161.999984, "MORREU:_0");
  188. TextDrawLetterSize(TDEditor_TD[11], 0.251294, 1.124998);
  189. TextDrawAlignment(TDEditor_TD[11], 1);
  190. TextDrawColor(TDEditor_TD[11], 255);
  191. TextDrawBackgroundColor(TDEditor_TD[11], 255);
  192. TextDrawFont(TDEditor_TD[11], 2);
  193. TextDrawSetProportional(TDEditor_TD[11], 1);
  194. TextDrawSetShadow(TDEditor_TD[11], 0);
  195.  
  196. TDEditor_TD[12] = TextDrawCreate(212.353179, 161.999984, "MORREU:_0");
  197. TextDrawLetterSize(TDEditor_TD[12], 0.251294, 1.124998);
  198. TextDrawAlignment(TDEditor_TD[12], 1);
  199. TextDrawColor(TDEditor_TD[12], 255);
  200. TextDrawBackgroundColor(TDEditor_TD[12], 255);
  201. TextDrawFont(TDEditor_TD[12], 2);
  202. TextDrawSetProportional(TDEditor_TD[12], 1);
  203. TextDrawSetShadow(TDEditor_TD[12], 0);
  204.  
  205. TDEditor_TD[13] = TextDrawCreate(212.353164, 171.333297, "PONTOS:_0");
  206. TextDrawLetterSize(TDEditor_TD[13], 0.251294, 1.124998);
  207. TextDrawAlignment(TDEditor_TD[13], 1);
  208. TextDrawColor(TDEditor_TD[13], 255);
  209. TextDrawBackgroundColor(TDEditor_TD[13], 255);
  210. TextDrawFont(TDEditor_TD[13], 2);
  211. TextDrawSetProportional(TDEditor_TD[13], 1);
  212. TextDrawSetShadow(TDEditor_TD[13], 0);
  213.  
  214. TDEditor_TD[14] = TextDrawCreate(332.352966, 171.333297, "PONTOS:_0");
  215. TextDrawLetterSize(TDEditor_TD[14], 0.251294, 1.124998);
  216. TextDrawAlignment(TDEditor_TD[14], 1);
  217. TextDrawColor(TDEditor_TD[14], 255);
  218. TextDrawBackgroundColor(TDEditor_TD[14], 255);
  219. TextDrawFont(TDEditor_TD[14], 2);
  220. TextDrawSetProportional(TDEditor_TD[14], 1);
  221. TextDrawSetShadow(TDEditor_TD[14], 0);
  222.  
  223. TDEditor_TD[15] = TextDrawCreate(214.706008, 163.166671, "_");
  224. TextDrawLetterSize(TDEditor_TD[15], 0.413647, -0.447499);
  225. TextDrawTextSize(TDEditor_TD[15], 267.000000, 0.000000);
  226. TextDrawAlignment(TDEditor_TD[15], 1);
  227. TextDrawColor(TDEditor_TD[15], -1);
  228. TextDrawUseBox(TDEditor_TD[15], 1);
  229. TextDrawBoxColor(TDEditor_TD[15], -16777126);
  230. TextDrawBackgroundColor(TDEditor_TD[15], 255);
  231. TextDrawFont(TDEditor_TD[15], 1);
  232. TextDrawSetProportional(TDEditor_TD[15], 1);
  233. TextDrawSetShadow(TDEditor_TD[15], 0);
  234.  
  235. TDEditor_TD[16] = TextDrawCreate(214.706008, 173.083267, "_");
  236. TextDrawLetterSize(TDEditor_TD[16], 0.413647, -0.447499);
  237. TextDrawTextSize(TDEditor_TD[16], 267.000000, 0.000000);
  238. TextDrawAlignment(TDEditor_TD[16], 1);
  239. TextDrawColor(TDEditor_TD[16], -1);
  240. TextDrawUseBox(TDEditor_TD[16], 1);
  241. TextDrawBoxColor(TDEditor_TD[16], -16777126);
  242. TextDrawBackgroundColor(TDEditor_TD[16], 255);
  243. TextDrawFont(TDEditor_TD[16], 1);
  244. TextDrawSetProportional(TDEditor_TD[16], 1);
  245. TextDrawSetShadow(TDEditor_TD[16], 0);
  246.  
  247. TDEditor_TD[17] = TextDrawCreate(214.706008, 182.999893, "_");
  248. TextDrawLetterSize(TDEditor_TD[17], 0.413647, -0.447499);
  249. TextDrawTextSize(TDEditor_TD[17], 267.000000, 0.000000);
  250. TextDrawAlignment(TDEditor_TD[17], 1);
  251. TextDrawColor(TDEditor_TD[17], -1);
  252. TextDrawUseBox(TDEditor_TD[17], 1);
  253. TextDrawBoxColor(TDEditor_TD[17], -16777126);
  254. TextDrawBackgroundColor(TDEditor_TD[17], 255);
  255. TextDrawFont(TDEditor_TD[17], 1);
  256. TextDrawSetProportional(TDEditor_TD[17], 1);
  257. TextDrawSetShadow(TDEditor_TD[17], 0);
  258.  
  259. TDEditor_TD[18] = TextDrawCreate(333.764862, 163.749893, "_");
  260. TextDrawLetterSize(TDEditor_TD[18], 0.413647, -0.447499);
  261. TextDrawTextSize(TDEditor_TD[18], 388.000000, 0.000000);
  262. TextDrawAlignment(TDEditor_TD[18], 1);
  263. TextDrawColor(TDEditor_TD[18], -1);
  264. TextDrawUseBox(TDEditor_TD[18], 1);
  265. TextDrawBoxColor(TDEditor_TD[18], -16777126);
  266. TextDrawBackgroundColor(TDEditor_TD[18], 255);
  267. TextDrawFont(TDEditor_TD[18], 1);
  268. TextDrawSetProportional(TDEditor_TD[18], 1);
  269. TextDrawSetShadow(TDEditor_TD[18], 0);
  270.  
  271. TDEditor_TD[19] = TextDrawCreate(334.235443, 173.666534, "_");
  272. TextDrawLetterSize(TDEditor_TD[19], 0.413647, -0.447499);
  273. TextDrawTextSize(TDEditor_TD[19], 388.000000, 0.000000);
  274. TextDrawAlignment(TDEditor_TD[19], 1);
  275. TextDrawColor(TDEditor_TD[19], -1);
  276. TextDrawUseBox(TDEditor_TD[19], 1);
  277. TextDrawBoxColor(TDEditor_TD[19], -16777126);
  278. TextDrawBackgroundColor(TDEditor_TD[19], 255);
  279. TextDrawFont(TDEditor_TD[19], 1);
  280. TextDrawSetProportional(TDEditor_TD[19], 1);
  281. TextDrawSetShadow(TDEditor_TD[19], 0);
  282.  
  283. TDEditor_TD[20] = TextDrawCreate(334.235443, 183.583160, "_");
  284. TextDrawLetterSize(TDEditor_TD[20], 0.413647, -0.447499);
  285. TextDrawTextSize(TDEditor_TD[20], 388.000000, 0.000000);
  286. TextDrawAlignment(TDEditor_TD[20], 1);
  287. TextDrawColor(TDEditor_TD[20], -1);
  288. TextDrawUseBox(TDEditor_TD[20], 1);
  289. TextDrawBoxColor(TDEditor_TD[20], -16777126);
  290. TextDrawBackgroundColor(TDEditor_TD[20], 255);
  291. TextDrawFont(TDEditor_TD[20], 1);
  292. TextDrawSetProportional(TDEditor_TD[20], 1);
  293. TextDrawSetShadow(TDEditor_TD[20], 0);
  294.  
  295. TDEditor_TD[21] = TextDrawCreate(227.882522, 182.416656, "VITORIA");
  296. TextDrawLetterSize(TDEditor_TD[21], 0.496470, 2.270833);
  297. TextDrawAlignment(TDEditor_TD[21], 1);
  298. TextDrawColor(TDEditor_TD[21], -65281);
  299. TextDrawBackgroundColor(TDEditor_TD[21], 255);
  300. TextDrawFont(TDEditor_TD[21], 2);
  301. TextDrawSetProportional(TDEditor_TD[21], 1);
  302. TextDrawSetShadow(TDEditor_TD[21], 0);
  303.  
  304. TDEditor_TD[22] = TextDrawCreate(350.235260, 182.416656, "VITORIA");
  305. TextDrawLetterSize(TDEditor_TD[22], 0.496470, 2.270833);
  306. TextDrawAlignment(TDEditor_TD[22], 1);
  307. TextDrawColor(TDEditor_TD[22], -65281);
  308. TextDrawBackgroundColor(TDEditor_TD[22], 255);
  309. TextDrawFont(TDEditor_TD[22], 2);
  310. TextDrawSetProportional(TDEditor_TD[22], 1);
  311. TextDrawSetShadow(TDEditor_TD[22], 0);
  312.  
  313. Contagem_Equipe_1 = 0;
  314. Contagem_Equipe_2 = 0;
  315. Pontos_Equipe_1 = 0;
  316. Pontos_Equipe_2 = 0;
  317.  
  318. #if SHOW_NICK == true
  319. ShowNameTags(0);
  320. #endif
  321.  
  322. return 1;
  323. }
  324.  
  325. public OnFilterScriptExit()
  326. {
  327. DestroyDynamicCP(CP_Equipe_1);
  328. DestroyDynamicCP(CP_Equipe_2);
  329. DestroyDynamicPickup(PickupMode);
  330.  
  331. for(new i = 0; i < sizeof(TDEditor_TD); i++)
  332. TextDrawDestroy(TDEditor_TD[i]);
  333.  
  334. return 1;
  335. }
  336.  
  337. public OnPlayerConnect(playerid)
  338. {
  339. TDEditor_PTD[0] = CreatePlayerTextDraw(playerid, 1.058681, 281.000183, "_");
  340. PlayerTextDrawLetterSize(playerid, TDEditor_PTD[0], 0.306353, 3.752499);
  341. PlayerTextDrawTextSize(playerid, TDEditor_PTD[0], 84.000000, 0.000000);
  342. PlayerTextDrawAlignment(playerid, TDEditor_PTD[0], 1);
  343. PlayerTextDrawColor(playerid, TDEditor_PTD[0], -1);
  344. PlayerTextDrawUseBox(playerid, TDEditor_PTD[0], 1);
  345. PlayerTextDrawBoxColor(playerid, TDEditor_PTD[0], -16777126);
  346. PlayerTextDrawSetShadow(playerid, TDEditor_PTD[0], 0);
  347. PlayerTextDrawSetOutline(playerid, TDEditor_PTD[0], 0);
  348. PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[0], 255);
  349. PlayerTextDrawFont(playerid, TDEditor_PTD[0], 1);
  350. PlayerTextDrawSetProportional(playerid, TDEditor_PTD[0], 1);
  351. PlayerTextDrawSetShadow(playerid, TDEditor_PTD[0], 0);
  352.  
  353. TDEditor_PTD[1] = CreatePlayerTextDraw(playerid, 3.411756, 278.666656, "MEMBROS:_0");
  354. PlayerTextDrawLetterSize(playerid, TDEditor_PTD[1], 0.265411, 1.139165);
  355. PlayerTextDrawAlignment(playerid, TDEditor_PTD[1], 1);
  356. PlayerTextDrawColor(playerid, TDEditor_PTD[1], -65281);
  357. PlayerTextDrawSetShadow(playerid, TDEditor_PTD[1], 0);
  358. PlayerTextDrawSetOutline(playerid, TDEditor_PTD[1], 0);
  359. PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[1], 255);
  360. PlayerTextDrawFont(playerid, TDEditor_PTD[1], 2);
  361. PlayerTextDrawSetProportional(playerid, TDEditor_PTD[1], 1);
  362. PlayerTextDrawSetShadow(playerid, TDEditor_PTD[1], 0);
  363.  
  364. TDEditor_PTD[2] = CreatePlayerTextDraw(playerid, 3.411756, 286.967163, "MATOU:_0");
  365. PlayerTextDrawLetterSize(playerid, TDEditor_PTD[2], 0.257411, 1.139165);
  366. PlayerTextDrawAlignment(playerid, TDEditor_PTD[2], 1);
  367. PlayerTextDrawColor(playerid, TDEditor_PTD[2], -65281);
  368. PlayerTextDrawSetShadow(playerid, TDEditor_PTD[2], 0);
  369. PlayerTextDrawSetOutline(playerid, TDEditor_PTD[2], 0);
  370. PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[2], 255);
  371. PlayerTextDrawFont(playerid, TDEditor_PTD[2], 2);
  372. PlayerTextDrawSetProportional(playerid, TDEditor_PTD[2], 1);
  373. PlayerTextDrawSetShadow(playerid, TDEditor_PTD[2], 0);
  374.  
  375. TDEditor_PTD[3] = CreatePlayerTextDraw(playerid, 3.411756, 295.167663, "MORREU:_0");
  376. PlayerTextDrawLetterSize(playerid, TDEditor_PTD[3], 0.257411, 1.139165);
  377. PlayerTextDrawAlignment(playerid, TDEditor_PTD[3], 1);
  378. PlayerTextDrawColor(playerid, TDEditor_PTD[3], -65281);
  379. PlayerTextDrawSetShadow(playerid, TDEditor_PTD[3], 0);
  380. PlayerTextDrawSetOutline(playerid, TDEditor_PTD[3], 0);
  381. PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[3], 255);
  382. PlayerTextDrawFont(playerid, TDEditor_PTD[3], 2);
  383. PlayerTextDrawSetProportional(playerid, TDEditor_PTD[3], 1);
  384. PlayerTextDrawSetShadow(playerid, TDEditor_PTD[3], 0);
  385.  
  386. TDEditor_PTD[4] = CreatePlayerTextDraw(playerid, 3.411756, 303.668182, "CAPTUROU:_0");
  387. PlayerTextDrawLetterSize(playerid, TDEditor_PTD[4], 0.257411, 1.139165);
  388. PlayerTextDrawAlignment(playerid, TDEditor_PTD[4], 1);
  389. PlayerTextDrawColor(playerid, TDEditor_PTD[4], -65281);
  390. PlayerTextDrawSetShadow(playerid, TDEditor_PTD[4], 0);
  391. PlayerTextDrawSetOutline(playerid, TDEditor_PTD[4], 0);
  392. PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[4], 255);
  393. PlayerTextDrawFont(playerid, TDEditor_PTD[4], 2);
  394. PlayerTextDrawSetProportional(playerid, TDEditor_PTD[4], 1);
  395. PlayerTextDrawSetShadow(playerid, TDEditor_PTD[4], 0);
  396.  
  397. Equipe[playerid] = 0;
  398. Matou[playerid] = 0;
  399. Morreu[playerid] = 0;
  400. Capturou[playerid] = 0;
  401. FoiMG[playerid] = false;
  402. ComPickup[playerid] = false;
  403.  
  404. return 1;
  405. }
  406.  
  407. public OnPlayerSpawn(playerid)
  408. {
  409. new String[129];
  410.  
  411. if(IniciouMG == true && FoiMG[playerid] == true)
  412. {
  413. if(Contagem_Equipe_1 == 0)
  414. {
  415. Equipe[playerid] = 1;
  416. Contagem_Equipe_1 ++;
  417. SetPlayerTeam(playerid, 1);
  418. SetPlayerSkin(playerid, 105);
  419. new RandomSpawn = random(sizeof(RandomEquipe1Spawn));
  420. SetPlayerPos(playerid, RandomEquipe1Spawn[RandomSpawn][0], RandomEquipe1Spawn[RandomSpawn][1], RandomEquipe1Spawn[RandomSpawn][2]);
  421. format(String, sizeof(String), "O Jogador %s entrou para a Equipe %i. [MEMBROS: %i]", GetName(playerid), Equipe[playerid], Contagem_Equipe_1);
  422. for(new i = 0; i < MAX_PLAYERS; i++) SetPlayerMarkerForPlayer(playerid, i, 0xFFFFFF00);
  423. }
  424. else if(Contagem_Equipe_1 >= Contagem_Equipe_2)
  425. {
  426. Equipe[playerid] = 2;
  427. Contagem_Equipe_2 ++;
  428. SetPlayerTeam(playerid, 2);
  429. SetPlayerSkin(playerid, 103);
  430. new RandomSpawn = random(sizeof(RandomEquipe2Spawn));
  431. SetPlayerPos(playerid, RandomEquipe2Spawn[RandomSpawn][0], RandomEquipe2Spawn[RandomSpawn][1], RandomEquipe2Spawn[RandomSpawn][2]);
  432. format(String, sizeof(String), "O Jogador %s entrou para a Equipe %i. [MEMBROS: %i]", GetName(playerid), Equipe[playerid], Contagem_Equipe_2);
  433. for(new i = 0; i < MAX_PLAYERS; i++) SetPlayerMarkerForPlayer(playerid, i, 0xFFFFFF00);
  434. }
  435. else if(Contagem_Equipe_2 >= Contagem_Equipe_1)
  436. {
  437. Equipe[playerid] = 1;
  438. Contagem_Equipe_1 ++;
  439. SetPlayerTeam(playerid, 1);
  440. SetPlayerSkin(playerid, 105);
  441. new RandomSpawn = random(sizeof(RandomEquipe1Spawn));
  442. SetPlayerPos(playerid, RandomEquipe1Spawn[RandomSpawn][0], RandomEquipe1Spawn[RandomSpawn][1], RandomEquipe1Spawn[RandomSpawn][2]);
  443. format(String, sizeof(String), "O Jogador %s entrou para a Equipe %i. [MEMBROS: %i]", GetName(playerid), Equipe[playerid], Contagem_Equipe_1);
  444. for(new i = 0; i < MAX_PLAYERS; i++) SetPlayerMarkerForPlayer(playerid, i, 0xFFFFFF00);
  445. }
  446. SendClientMessageToAll(-1, String);
  447.  
  448. SetPlayerArmour(playerid, 100.0);
  449. SetPlayerHealth(playerid, 100.0);
  450.  
  451. for(new i = 0; i < sizeof(TDEditor_PTD); i++)
  452. PlayerTextDrawShow(playerid, TDEditor_PTD[i]);
  453.  
  454. TextDrawShowForPlayer(playerid, TDEditor_TD[0]);
  455. TextDrawShowForPlayer(playerid, TDEditor_TD[1]);
  456. TextDrawShowForPlayer(playerid, TDEditor_TD[2]);
  457.  
  458. GivePlayerWeapon(playerid, 5, 999);
  459. GivePlayerWeapon(playerid, 16, 999);
  460. GivePlayerWeapon(playerid, 22, 999);
  461. GivePlayerWeapon(playerid, 26, 999);
  462. GivePlayerWeapon(playerid, 31, 999);
  463. GivePlayerWeapon(playerid, 34, 999);
  464. GivePlayerWeapon(playerid, 35, 3);
  465.  
  466. TimerAtualizar[playerid] = SetTimerEx("AtualizarDados", 1000, true, "i", playerid);
  467.  
  468. return 1;
  469. }
  470.  
  471. SetPlayerHealth(playerid, 100.0);
  472.  
  473. for(new i = 0; i < MAX_PLAYERS; i++) SetPlayerMarkerForPlayer(playerid, i, 0x663300FF);
  474.  
  475. return 1;
  476. }
  477.  
  478. public OnPlayerRequestClass(playerid,classid)
  479. {
  480. return SpawnPlayer(playerid);
  481. }
  482.  
  483. forward AtualizarDados(playerid);
  484. public AtualizarDados(playerid)
  485. {
  486. new String[50];
  487.  
  488. format(String, sizeof(String), "Equipe_1:_%i_PONTOS", Pontos_Equipe_1);
  489. TextDrawSetString(TDEditor_TD[1], String);
  490. TextDrawShowForPlayer(playerid, TDEditor_TD[1]);
  491.  
  492. format(String, sizeof(String), "Equipe_2:_%i_PONTOS", Pontos_Equipe_2);
  493. TextDrawSetString(TDEditor_TD[2], String);
  494. TextDrawShowForPlayer(playerid, TDEditor_TD[2]);
  495.  
  496. if(Equipe[playerid] == 1)
  497. {
  498. format(String, sizeof(String), "MEMBROS:_%i", Contagem_Equipe_1);
  499. PlayerTextDrawSetString(playerid, TDEditor_PTD[1], String);
  500. PlayerTextDrawShow(playerid, TDEditor_PTD[1]);
  501.  
  502. format(String, sizeof(String), "MATOU:_%i", Matou[playerid]);
  503. PlayerTextDrawSetString(playerid, TDEditor_PTD[2], String);
  504. PlayerTextDrawShow(playerid, TDEditor_PTD[2]);
  505.  
  506. format(String, sizeof(String), "MORREU:_%i", Morreu[playerid]);
  507. PlayerTextDrawSetString(playerid, TDEditor_PTD[3], String);
  508. PlayerTextDrawShow(playerid, TDEditor_PTD[3]);
  509.  
  510. format(String, sizeof(String), "CAPTUROU:_%i", Capturou[playerid]);
  511. PlayerTextDrawSetString(playerid, TDEditor_PTD[4], String);
  512. PlayerTextDrawShow(playerid, TDEditor_PTD[4]);
  513. }
  514. else if(Equipe[playerid] == 2)
  515. {
  516. format(String, sizeof(String), "MEMBROS:_%i", Contagem_Equipe_2);
  517. PlayerTextDrawSetString(playerid, TDEditor_PTD[1], String);
  518. PlayerTextDrawShow(playerid, TDEditor_PTD[1]);
  519.  
  520. format(String, sizeof(String), "MATOU:_%i", Matou[playerid]);
  521. PlayerTextDrawSetString(playerid, TDEditor_PTD[2], String);
  522. PlayerTextDrawShow(playerid, TDEditor_PTD[2]);
  523.  
  524. format(String, sizeof(String), "MORREU:_%i", Morreu[playerid]);
  525. PlayerTextDrawSetString(playerid, TDEditor_PTD[3], String);
  526. PlayerTextDrawShow(playerid, TDEditor_PTD[3]);
  527.  
  528. format(String, sizeof(String), "CAPTUROU:_%i", Capturou[playerid]);
  529. PlayerTextDrawSetString(playerid, TDEditor_PTD[4], String);
  530. PlayerTextDrawShow(playerid, TDEditor_PTD[4]);
  531. }
  532.  
  533. return 1;
  534. }
  535.  
  536. public OnPlayerDisconnect(playerid, reason)
  537. {
  538. new String[129];
  539.  
  540. if(Equipe[playerid] == 1)
  541. Contagem_Equipe_1 --,
  542. format(String, sizeof(String), "O Jogador %s [Equipe %i] saiu do servidor. [MEMBROS: %i]", GetName(playerid), Equipe[playerid], Contagem_Equipe_1);
  543. else if(Equipe[playerid] == 2)
  544. Contagem_Equipe_2 --,
  545. format(String, sizeof(String), "O Jogador %s [Equipe %i] saiu do servidor. [MEMBROS: %i]", GetName(playerid), Equipe[playerid], Contagem_Equipe_2);
  546. SendClientMessageToAll(-1, String);
  547.  
  548. if(ComPickup[playerid] == true)
  549. {
  550. new RandomSpawnPickup = random(sizeof(RandomPickupSpawn));
  551. PickupMode = CreateDynamicPickup(1279, 19, RandomPickupSpawn[RandomSpawnPickup][0], RandomPickupSpawn[RandomSpawnPickup][1], RandomPickupSpawn[RandomSpawnPickup][2], -1);
  552. }
  553.  
  554. for(new i = 0; i < sizeof(TDEditor_PTD); i++)
  555. PlayerTextDrawDestroy(playerid, TDEditor_PTD[i]);
  556.  
  557. for(new i = 0; i < sizeof(TDEditor_TD); i++)
  558. TextDrawDestroy(TDEditor_TD[i]);
  559.  
  560. return 1;
  561. }
  562.  
  563. public OnPlayerDeath(playerid, killerid, reason)
  564. {
  565. new String[129];
  566.  
  567. if(FoiMG[playerid] == true || FoiMG[killerid] == true)
  568. {
  569. if(killerid != INVALID_PLAYER_ID)
  570. {
  571. if(ComPickup[playerid] == false)
  572. format(String, sizeof(String), "O Jogador %s [Equipe %i] foi morto em combate pelo Jogador %s [Equipe %i].", GetName(playerid), Equipe[playerid], GetName(killerid), Equipe[killerid]),
  573. SendClientMessageToAll(-1, String);
  574. else if(ComPickup[playerid] == true)
  575. {
  576. new
  577. Float:PosX,
  578. Float:PosY,
  579. Float:PosZ
  580. ;
  581.  
  582. GetPlayerPos(playerid, PosX, PosY, PosZ);
  583.  
  584. PickupMode = CreateDynamicPickup(1279, 19, PosX, PosY, PosZ, -1);
  585.  
  586. SendClientMessage(playerid, -1, "Você perdeu a droga.");
  587.  
  588. RemovePlayerAttachedObject(playerid, PlayerComDroga);
  589. DestroyObject(PlayerComDroga);
  590.  
  591. format(String, sizeof(String), "O Jogador %s [Equipe %i] foi morto. Peguem a droga!!!", GetName(playerid), Equipe[playerid]);
  592. SendClientMessageToAll(-1, String);
  593.  
  594. for(new i = 0; i < MAX_PLAYERS; i++)
  595. {
  596. if(FoiMG[i] == false) continue;
  597. SetPlayerMarkerForPlayer(playerid, i, 0xFFFFFF00);
  598. }
  599.  
  600. ComPickup[playerid] = false;
  601. }
  602. else format(String, sizeof(String), "O Jogador %s [Equipe %i] morreu.", GetName(playerid), Equipe[playerid]),
  603. SendClientMessageToAll(-1, String);
  604.  
  605. Morreu[playerid] ++;
  606. Matou[killerid] ++;
  607.  
  608. if(Equipe[playerid] == 1) Contagem_Equipe_1 --;
  609. else if(Equipe[playerid] == 2) Contagem_Equipe_2 --;
  610. }
  611. else
  612. {
  613. if(ComPickup[playerid] == true)
  614. {
  615. new
  616. Float:PosX,
  617. Float:PosY,
  618. Float:PosZ
  619. ;
  620.  
  621. GetPlayerPos(playerid, PosX, PosY, PosZ);
  622.  
  623. PickupMode = CreateDynamicPickup(1279, 19, PosX, PosY, PosZ, -1);
  624.  
  625. SendClientMessage(playerid, -1, "Você perdeu a droga.");
  626.  
  627. RemovePlayerAttachedObject(playerid, PlayerComDroga);
  628. DestroyObject(PlayerComDroga);
  629.  
  630. format(String, sizeof(String), "O Jogador %s [Equipe %i] foi morto. Peguem a droga!!!", GetName(playerid), Equipe[playerid]);
  631. SendClientMessageToAll(-1, String);
  632.  
  633. for(new i = 0; i < MAX_PLAYERS; i++)
  634. {
  635. if(FoiMG[i] == false) continue;
  636. SetPlayerMarkerForPlayer(playerid, i, 0xFFFFFF00);
  637. }
  638.  
  639. ComPickup[playerid] = false;
  640. }
  641. else format(String, sizeof(String), "O Jogador %s [Equipe %i] morreu.", GetName(playerid), Equipe[playerid]),
  642. SendClientMessageToAll(-1, String);
  643.  
  644. Morreu[playerid] ++;
  645.  
  646. if(Equipe[playerid] == 1) Contagem_Equipe_1 --;
  647. else if(Equipe[playerid] == 2) Contagem_Equipe_2 --;
  648. }
  649. }
  650.  
  651. return 1;
  652. }
  653.  
  654. public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
  655. {
  656. new
  657. Float:pHealth
  658. ;
  659.  
  660. GetPlayerHealth(damagedid, pHealth);
  661.  
  662. if(damagedid != INVALID_PLAYER_ID)
  663. {
  664. if(Equipe[playerid] == Equipe[damagedid])
  665. return SendClientMessage(playerid, -1, "Esse player é da sua Equipe!"),
  666. SetPlayerHealth(damagedid, pHealth);
  667. }
  668. return 1;
  669. }
  670.  
  671. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  672. {
  673. new String[129];
  674.  
  675. if(checkpointid == CP_Equipe_2)
  676. {
  677. if(Equipe[playerid] == 2 && ComPickup[playerid] == true)
  678. {
  679. Pontos_Equipe_2 ++;
  680.  
  681. DestroyDynamicPickup(PickupMode);
  682.  
  683. format(String, sizeof(String), "O Jogador %s [Equipe %i] levou mais uma droga para sua Equipe! [TOTAL: %i/%i]", GetName(playerid), Equipe[playerid], Pontos_Equipe_2, MAX_PONTOS);
  684. SendClientMessageToAll(-1, String);
  685.  
  686. for(new i = 0; i < MAX_PLAYERS; i++)
  687. {
  688. if(FoiMG[i] == false) continue;
  689. SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
  690. }
  691.  
  692. RemovePlayerAttachedObject(playerid, PlayerComDroga);
  693. DestroyObject(PlayerComDroga);
  694.  
  695. Capturou[playerid] ++;
  696.  
  697. ComPickup[playerid] = false;
  698.  
  699. new RandomSpawnPickup = random(sizeof(RandomPickupSpawn));
  700. PickupMode = CreateDynamicPickup(1279, 19, RandomPickupSpawn[RandomSpawnPickup][0], RandomPickupSpawn[RandomSpawnPickup][1], RandomPickupSpawn[RandomSpawnPickup][2], -1);
  701.  
  702. if(Pontos_Equipe_2 >= MAX_PONTOS)
  703. {
  704. foreach(new i : Player)
  705. {
  706. if(FoiMG[i] == false) continue;
  707. SetPlayerHealth(i, 9999999.0);
  708. ResetPlayerWeapons(i);
  709. EncerrarPartida(i);
  710. }
  711. }
  712. }
  713. }
  714.  
  715. if(checkpointid == CP_Equipe_1)
  716. {
  717. if(Equipe[playerid] == 1 && ComPickup[playerid] == true)
  718. {
  719. Pontos_Equipe_1 ++;
  720.  
  721. DestroyDynamicPickup(PickupMode);
  722.  
  723. format(String, sizeof(String), "O Jogador %s [Equipe %i] levou mais uma droga para sua Equipe! [TOTAL: %i/%i]", GetName(playerid), Equipe[playerid], Pontos_Equipe_1, MAX_PONTOS);
  724. SendClientMessageToAll(-1, String);
  725.  
  726. for(new i = 0; i < MAX_PLAYERS; i++)
  727. {
  728. if(FoiMG[i] == false) continue;
  729. SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
  730. }
  731.  
  732. RemovePlayerAttachedObject(playerid, PlayerComDroga);
  733. DestroyObject(PlayerComDroga);
  734.  
  735. Capturou[playerid] ++;
  736.  
  737. ComPickup[playerid] = false;
  738.  
  739. new RandomSpawnPickup = random(sizeof(RandomPickupSpawn));
  740. PickupMode = CreateDynamicPickup(1279, 19, RandomPickupSpawn[RandomSpawnPickup][0], RandomPickupSpawn[RandomSpawnPickup][1], RandomPickupSpawn[RandomSpawnPickup][2], -1);
  741.  
  742. if(Pontos_Equipe_1 >= MAX_PONTOS)
  743. {
  744. foreach(new i : Player)
  745. {
  746. if(FoiMG[i] == false) continue;
  747. SetPlayerHealth(i, 9999999.0);
  748. ResetPlayerWeapons(i);
  749. EncerrarPartida(i);
  750. }
  751. }
  752. }
  753. }
  754.  
  755. return 1;
  756. }
  757.  
  758. stock EncerrarPartida(playerid)
  759. {
  760. KillTimer(TimerAtualizar[playerid]);
  761.  
  762. TextDrawHideForPlayer(playerid, TDEditor_TD[0]);
  763. TextDrawHideForPlayer(playerid, TDEditor_TD[1]);
  764. TextDrawHideForPlayer(playerid, TDEditor_TD[2]);
  765.  
  766. PlayerTextDrawHide(playerid, TDEditor_PTD[0]);
  767. PlayerTextDrawHide(playerid, TDEditor_PTD[1]);
  768. PlayerTextDrawHide(playerid, TDEditor_PTD[2]);
  769. PlayerTextDrawHide(playerid, TDEditor_PTD[3]);
  770. PlayerTextDrawHide(playerid, TDEditor_PTD[4]);
  771.  
  772. new String[50], Contar_Matou[2], Contar_Morreu[2];
  773.  
  774. foreach(new i : Player)
  775. {
  776. if(Equipe[i] == 1) Contar_Matou[0] += Matou[i];
  777. if(Equipe[i] == 2) Contar_Matou[1] += Matou[i];
  778. }
  779.  
  780. format(String, sizeof(String), "MATOU:_%i", Contar_Matou[0]);
  781. TextDrawSetString(TDEditor_TD[9], String);
  782. TextDrawShowForPlayer(playerid, TDEditor_TD[9]);
  783.  
  784. format(String, sizeof(String), "MATOU:_%i", Contar_Matou[1]);
  785. TextDrawSetString(TDEditor_TD[10], String);
  786. TextDrawShowForPlayer(playerid, TDEditor_TD[10]);
  787.  
  788. foreach(new i : Player)
  789. {
  790. if(Equipe[i] == 1) Contar_Morreu[0] += Morreu[i];
  791. if(Equipe[i] == 2) Contar_Morreu[1] += Morreu[i];
  792. }
  793.  
  794. format(String, sizeof(String), "MORREU:_%i", Contar_Morreu[0]);
  795. TextDrawSetString(TDEditor_TD[12], String);
  796. TextDrawShowForPlayer(playerid, TDEditor_TD[12]);
  797.  
  798. format(String, sizeof(String), "MORREU:_%i", Contar_Morreu[1]);
  799. TextDrawSetString(TDEditor_TD[11], String);
  800. TextDrawShowForPlayer(playerid, TDEditor_TD[11]);
  801.  
  802. format(String, sizeof(String), "PONTOS:_%i", Pontos_Equipe_1);
  803. TextDrawSetString(TDEditor_TD[13], String);
  804. TextDrawShowForPlayer(playerid, TDEditor_TD[13]);
  805.  
  806. format(String, sizeof(String), "PONTOS:_%i", Pontos_Equipe_2);
  807. TextDrawSetString(TDEditor_TD[14], String);
  808. TextDrawShowForPlayer(playerid, TDEditor_TD[14]);
  809.  
  810. TextDrawShowForPlayer(playerid, TDEditor_TD[3]);
  811. TextDrawShowForPlayer(playerid, TDEditor_TD[4]);
  812. TextDrawShowForPlayer(playerid, TDEditor_TD[5]);
  813. TextDrawShowForPlayer(playerid, TDEditor_TD[6]);
  814. TextDrawShowForPlayer(playerid, TDEditor_TD[7]);
  815. TextDrawShowForPlayer(playerid, TDEditor_TD[8]);
  816. TextDrawShowForPlayer(playerid, TDEditor_TD[15]);
  817. TextDrawShowForPlayer(playerid, TDEditor_TD[16]);
  818. TextDrawShowForPlayer(playerid, TDEditor_TD[17]);
  819. TextDrawShowForPlayer(playerid, TDEditor_TD[18]);
  820. TextDrawShowForPlayer(playerid, TDEditor_TD[19]);
  821. TextDrawShowForPlayer(playerid, TDEditor_TD[20]);
  822.  
  823. if(Pontos_Equipe_1 > Pontos_Equipe_2) TextDrawShowForPlayer(playerid, TDEditor_TD[21]);
  824. else if(Pontos_Equipe_2 > Pontos_Equipe_1) TextDrawShowForPlayer(playerid, TDEditor_TD[22]);
  825.  
  826. Contagem_Equipe_1 = 0;
  827. Contagem_Equipe_2 = 0;
  828.  
  829. IniciouMG = false;
  830.  
  831. DestroyDynamicCP(CP_Equipe_1);
  832. DestroyDynamicCP(CP_Equipe_2);
  833. DestroyDynamicPickup(PickupMode);
  834.  
  835. SetTimerEx("EsconderTextDraws", 15 * 1000, false, "i", playerid);
  836.  
  837. SendClientMessageToAll(-1, "A partida acabou.");
  838.  
  839. return 1;
  840. }
  841.  
  842. forward EsconderTextDraws(playerid);
  843. public EsconderTextDraws(playerid)
  844. {
  845. if(FoiMG[playerid] == true)
  846. {
  847. new String[50];
  848.  
  849. TextDrawHideForPlayer(playerid, TDEditor_TD[0]);
  850. TextDrawHideForPlayer(playerid, TDEditor_TD[1]);
  851. TextDrawHideForPlayer(playerid, TDEditor_TD[2]);
  852. TextDrawHideForPlayer(playerid, TDEditor_TD[3]);
  853. TextDrawHideForPlayer(playerid, TDEditor_TD[4]);
  854. TextDrawHideForPlayer(playerid, TDEditor_TD[5]);
  855. TextDrawHideForPlayer(playerid, TDEditor_TD[6]);
  856. TextDrawHideForPlayer(playerid, TDEditor_TD[7]);
  857. TextDrawHideForPlayer(playerid, TDEditor_TD[8]);
  858. TextDrawShowForPlayer(playerid, TDEditor_TD[9]);
  859. TextDrawShowForPlayer(playerid, TDEditor_TD[10]);
  860. TextDrawShowForPlayer(playerid, TDEditor_TD[11]);
  861. TextDrawShowForPlayer(playerid, TDEditor_TD[12]);
  862. TextDrawShowForPlayer(playerid, TDEditor_TD[13]);
  863. TextDrawShowForPlayer(playerid, TDEditor_TD[14]);
  864. TextDrawHideForPlayer(playerid, TDEditor_TD[15]);
  865. TextDrawHideForPlayer(playerid, TDEditor_TD[16]);
  866. TextDrawHideForPlayer(playerid, TDEditor_TD[17]);
  867. TextDrawHideForPlayer(playerid, TDEditor_TD[18]);
  868. TextDrawHideForPlayer(playerid, TDEditor_TD[19]);
  869. TextDrawHideForPlayer(playerid, TDEditor_TD[20]);
  870. TextDrawHideForPlayer(playerid, TDEditor_TD[21]);
  871. TextDrawHideForPlayer(playerid, TDEditor_TD[22]);
  872.  
  873. PlayerTextDrawHide(playerid, TDEditor_PTD[0]);
  874. PlayerTextDrawHide(playerid, TDEditor_PTD[1]);
  875. PlayerTextDrawHide(playerid, TDEditor_PTD[2]);
  876. PlayerTextDrawHide(playerid, TDEditor_PTD[3]);
  877. PlayerTextDrawHide(playerid, TDEditor_PTD[4]);
  878.  
  879. format(String, sizeof(String), "MATOU:_0");
  880. TextDrawSetString(TDEditor_TD[9], String);
  881. TextDrawHideForPlayer(playerid, TDEditor_TD[9]);
  882.  
  883. format(String, sizeof(String), "MATOU:_0");
  884. TextDrawSetString(TDEditor_TD[10], String);
  885. TextDrawHideForPlayer(playerid, TDEditor_TD[10]);
  886.  
  887. format(String, sizeof(String), "MORREU:_0");
  888. TextDrawSetString(TDEditor_TD[12], String);
  889. TextDrawHideForPlayer(playerid, TDEditor_TD[12]);
  890.  
  891. format(String, sizeof(String), "MORREU:_0");
  892. TextDrawSetString(TDEditor_TD[11], String);
  893. TextDrawHideForPlayer(playerid, TDEditor_TD[11]);
  894.  
  895. format(String, sizeof(String), "PONTOS:_%i", Pontos_Equipe_1 = 0);
  896. TextDrawSetString(TDEditor_TD[13], String);
  897. TextDrawHideForPlayer(playerid, TDEditor_TD[13]);
  898.  
  899. format(String, sizeof(String), "PONTOS:_%i", Pontos_Equipe_2 = 0);
  900. TextDrawSetString(TDEditor_TD[14], String);
  901. TextDrawHideForPlayer(playerid, TDEditor_TD[14]);
  902.  
  903. if(FoiMG[playerid] == true) FoiMG[playerid] = false;
  904.  
  905. SpawnPlayer(playerid);
  906. }
  907. }
  908.  
  909. public OnPlayerPickUpDynamicPickup(playerid, pickupid)
  910. {
  911. new String[129];
  912.  
  913. if(pickupid == PickupMode)
  914. {
  915. ComPickup[playerid] = true;
  916.  
  917. SendClientMessage(playerid, -1, "Você pegou o pickup.");
  918.  
  919. PlayerComDroga = CreateObject(1279, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
  920. AttachObjectToPlayer(PlayerComDroga, playerid, 0.0, 0.0, 2.0, 0.0, 0.0, 0);
  921.  
  922. for(new i = 0; i < MAX_PLAYERS; i++)
  923. {
  924. if(i == playerid || FoiMG[i] == false) continue;
  925. SetPlayerMarkerForPlayer(i, playerid, 0xCCFF99FF);
  926. }
  927.  
  928. foreach(new i : Player)
  929. {
  930. if(Equipe[i] == Equipe[playerid])
  931. format(String, sizeof(String), "O Jogador %s [Equipe %i] pegou a droga. Proteja ele!", GetName(playerid), Equipe[playerid], Pontos_Equipe_1);
  932. else format(String, sizeof(String), "O Jogador %s [Equipe %i] pegou a droga. Mate ele e pegue a droga!", GetName(playerid), Equipe[playerid], Pontos_Equipe_1);
  933. SendClientMessage(i, -1, String);
  934.  
  935. DestroyDynamicPickup(PickupMode);
  936. }
  937. }
  938.  
  939. return 1;
  940. }
  941.  
  942. public OnPlayerStateChange(playerid, newstate, oldstate)
  943. {
  944. return 1;
  945. }
  946.  
  947. public OnPlayerUpdate(playerid)
  948. {
  949. return 1;
  950. }
  951.  
  952. CMD:iniciarmg(playerid)
  953. {
  954. new String[129];
  955.  
  956. if(IniciouMG == true)
  957. return SendClientMessage(playerid, -1, "O MiniGame já foi iniciado!");
  958.  
  959. format(String, sizeof(String), "O Jogador %s iniciou o MiniGame. /irmg", GetName(playerid));
  960. SendClientMessageToAll(-1, String);
  961.  
  962. IniciouMG = true;
  963.  
  964. CP_Equipe_1 = CreateDynamicCP(1416.1147, 2774.2197, 10.8203, 5.0, -1, -1, -1, 800.0);
  965. CP_Equipe_2 = CreateDynamicCP(1143.2130, 2785.1191, 10.8203, 5.0, -1, -1, -1, 800.0);
  966.  
  967. new RandomSpawnPickup = random(sizeof(RandomPickupSpawn));
  968. PickupMode = CreateDynamicPickup(1279, 19, RandomPickupSpawn[RandomSpawnPickup][0], RandomPickupSpawn[RandomSpawnPickup][1], RandomPickupSpawn[RandomSpawnPickup][2], -1);
  969.  
  970. return 1;
  971. }
  972.  
  973. CMD:irmg(playerid)
  974. {
  975. if(IniciouMG == false)
  976. return SendClientMessage(playerid, -1, "O MiniGame ainda não foi iniciado!");
  977.  
  978. if(FoiMG[playerid] == true)
  979. return SendClientMessage(playerid, -1, "Você já está no MiniGame!");
  980.  
  981. FoiMG[playerid] = true;
  982.  
  983. SpawnPlayer(playerid);
  984.  
  985. SendClientMessage(playerid, -1, "Você foi para o MiniGame.");
  986. SendClientMessage(playerid, -1, "________________________________________________________");
  987. SendClientMessage(playerid, -1, "Como funciona:");
  988. SendClientMessage(playerid, -1, "Encontre a droga que foi perdida nesta área.");
  989. SendClientMessage(playerid, -1, "Se um integrande de sua equipe encontrar a droga, proteja-o!");
  990. SendClientMessage(playerid, -1, "Se um adversário encontrar a droga, Mate-o!");
  991. SendClientMessage(playerid, -1, "Para identificar o jogador com a droga, siga a seta.");
  992. SendClientMessage(playerid, -1, "________________________________________________________");
  993.  
  994. return 1;
  995. }
  996.  
  997. stock GetName(playerid)
  998. {
  999. new
  1000. GetName_[MAX_PLAYER_NAME]
  1001. ;
  1002.  
  1003. GetPlayerName(playerid, GetName_, sizeof(GetName_));
  1004.  
  1005. return GetName_;
  1006. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement