Guest User

A/D FS

a guest
Mar 22nd, 2015
745
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.03 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. #define AAD_TIME_TempoDeEsperaLobby 5000 //5 seg
  5. #define AAD_TIME_DuracaoDaPartida 300000 // 5 min
  6. #define AAD_TIME_IntervaloEntrePartidas 3600000 //1 hr
  7.  
  8. #define cinza 0xBABABAFF
  9.  
  10. new arena[MAX_PLAYERS];
  11.  
  12. new AAD_Vai[MAX_PLAYERS];
  13. new AAD_Team[MAX_PLAYERS];
  14. new AAD_Lobby;
  15. new AAD_EmProgresso;
  16. new AAD_KillsPerPlayer[MAX_PLAYERS];
  17. new AAD_Kills_1;
  18. new AAD_Kills_2;
  19. new AAD_Balancer;
  20. new AAD_Participantes;
  21. new AAD_TopKillerID_Kills;
  22. new AAD_TopKillerID;
  23. new AAD_TopKillerID_NAME[MAX_PLAYER_NAME];
  24. new AAD_Vencedor;
  25. new AAD_Vencedor_STR[40];
  26. new AAD_OldPlayerColor[MAX_PLAYERS];
  27. new AAD_DominandoTimer[MAX_PLAYERS];
  28. new AAD_DominandoINT[MAX_PLAYERS];
  29. new AAD_Dominado;
  30. new AAD_Timer;
  31. new AAD_Local;
  32. new AAD_Local_STR[20];
  33.  
  34. new string[1500];
  35. new string22[166];
  36.  
  37. new bool:PATT[MAX_PLAYERS];
  38. new bool:PDEFF[MAX_PLAYERS];
  39.  
  40. new Text:PinCP[MAX_PLAYERS];
  41. new Text:cptime[MAX_PLAYERS];
  42. new Text:totalp[MAX_PLAYERS];
  43. //new Text:TOTALHPATT[MAX_PLAYERS];
  44. //new Text:TOTALHPDEF[MAX_PLAYERS];
  45. new Text:textcont;
  46. new TempoMostrarText[MAX_PLAYERS];
  47. new MostrandoText[MAX_PLAYERS];
  48.  
  49. new GZEB,GZOF,GZJH,GZDO,GZCAL,GZGAN,GZBB,GZAP,GZLB,GZMARK,GZSK8;
  50.  
  51. new Float:AttacksEB[][4] = {
  52. {-1564.8308,2625.8884,55.8403,268.1628},
  53. {-1564.8308,2625.8884,55.8403,268.1628}};
  54.  
  55.  
  56. new Float:DeffendsEB[][4] = {
  57. {-1480.9575,2626.4058,58.7813,7.3566},
  58. {-1480.9575,2626.4058,58.7813,7.3566}};
  59.  
  60. new Float:AttacksOF[][4] = {
  61. {-2673.7610,40.3333,4.1797,74.6692},
  62. {-2673.7610,40.3333,4.1797,74.6692}};
  63.  
  64.  
  65. new Float:DeffendsOF[][4] = {
  66. {-2748.2119,125.6231,7.3377,211.9940},
  67. {-2748.2119,125.6231,7.3377,211.9940}};
  68.  
  69. new Float:AttacksJH[][4] = {
  70. {2231.4514,-1301.1141,23.8378,23.1672},
  71. {2231.4514,-1301.1141,23.8378,23.1672}};
  72.  
  73. new Float:DeffendsJH[][4] = {
  74. {2216.5342,-1179.3043,29.7971,174.9386},
  75. {2216.5342,-1179.3043,29.7971,174.9386}};
  76.  
  77. new Float:AttacksDO[][4] = {
  78. {2676.3750,-2438.1458,13.6306,275.8143},
  79. {2676.3750,-2438.1458,13.6306,275.8143}};
  80.  
  81.  
  82. new Float:DeffendsDO[][4] = {
  83. {2783.7666,-2455.7747,13.6346,267.3059},
  84. {2783.7666,-2455.7747,13.6346,267.3059}};
  85.  
  86. new Float:AttacksCAL[][4] = {
  87. {2054.1160,1284.3907,10.6719,274.6094},
  88. {2054.1160,1284.3907,10.6719,274.6094}};
  89.  
  90.  
  91. new Float:DeffendsCAL[][4] = {
  92. {2211.1270,1284.7239,10.8203,119.2131},
  93. {2211.1270,1284.7239,10.8203,119.2131}};
  94.  
  95. //NOVOS
  96.  
  97. new Float:AttacksGAN[][4] = {
  98. {2393.7244,-1501.7429,23.8349,306.3554},
  99. {2393.7244,-1501.7429,23.8349,306.3554}};
  100.  
  101.  
  102. new Float:DeffendsGAN[][4] = {
  103. {2246.2173,-1436.7993,25.7566,105.7917},
  104. {2246.2173,-1436.7993,25.7566,105.7917}};
  105.  
  106. new Float:AttacksBB[][4] = {
  107. {208.3047,-145.5398,1.5859,95.2822},
  108. {208.3047,-145.5398,1.5859,95.2822}};
  109.  
  110.  
  111. new Float:DeffendsBB[][4] = {
  112. {208.1822,-231.1275,1.7786,306.8443},
  113. {208.1822,-231.1275,1.7786,306.8443}};
  114.  
  115. new Float:AttacksAP[][4] = {
  116. {-2072.9636,-2506.6931,30.4697,61.9069},
  117. {-2072.9636,-2506.6931,30.4697,61.9069}};
  118.  
  119.  
  120. new Float:DeffendsAP[][4] = {
  121. {-2187.7422,-2427.8452,35.5162,142.1160},
  122. {-2187.7422,-2427.8452,35.5162,142.1160}};
  123.  
  124. new Float:AttacksLB[][4] = {
  125. {-863.2654,1562.4991,24.4756,269.9603},
  126. {-863.2654,1562.4991,24.4756,269.9603}};
  127.  
  128.  
  129. new Float:DeffendsLB[][4] = {
  130. {-725.7443,1545.0908,39.0630,259.0364},
  131. {-725.7443,1545.0908,39.0630,259.0364}};
  132.  
  133. new Float:AttacksMARK[][4] = {
  134. {1148.5477,-1589.9414,13.4836,28.3246},
  135. {1148.5477,-1589.9414,13.4836,28.3246}};
  136.  
  137.  
  138. new Float:DeffendsMARK[][4] = {
  139. {1128.9072,-1488.0807,22.7690,181.9221},
  140. {1128.9072,-1488.0807,22.7690,181.9221}};
  141.  
  142. new Float:AttacksSK8[][4] = {
  143. {1944.3647,-1367.6292,18.5781,96.1388},
  144. {1944.3647,-1367.6292,18.5781,96.1388}};
  145.  
  146.  
  147. new Float:DeffendsSK8[][4] = {
  148. {1771.9834,-1375.5273,15.7578,160.4254},
  149. {1771.9834,-1375.5273,15.7578,160.4254}};
  150.  
  151. public OnFilterScriptInit(){
  152. SetTimer("TimerPorSegundo", 6000, 1);
  153. AAD_Timer = SetTimer("AAD_DefLobby",AAD_TIME_IntervaloEntrePartidas, 0);
  154.  
  155. GZEB = GangZoneCreate(-1536.830810, 2555.888427, -1396.830810, 2723.888427); // el quebrados
  156. GZOF = GangZoneCreate(-2799.760986, 68.333297, -2701.760986, 180.333297); // ocean flats
  157. GZDO = GangZoneCreate(2704.375000, -2564.145751, 2844.375000, -2340.145751); // dockas
  158. GZCAL = GangZoneCreate(2123.260498, 1216.821166, 2305.260498, 1342.821166); // come a lot
  159. GZBB = GangZoneCreate(124.304702, -313.539794, 278.304687, -201.539794); // blue berry
  160. GZAP = GangZoneCreate(-2250.789550, -2481.484375, -2082.789550, -2397.484375); //angel pine
  161. GZLB = GangZoneCreate(-792.546691, 1492.499145, -680.546691, 1604.499145);// las barrancas
  162. GZMARK = GangZoneCreate(1064.547729, -1547.941406, 1176.547729, -1421.941406); // market
  163. GZSK8 = GangZoneCreate(1725.245117, -1440.484497, 1809.245117, -1300.484497); // sk8
  164. GZGAN = GangZoneCreate(2184.289550, -1486.367919, 2296.289550, -1374.367919); // ganton
  165. GZJH = GangZoneCreate(2175.639404, -1224.106445, 2259.639404, -1140.106445); // jefferson
  166.  
  167. textcont = TextDrawCreate(2.000000, 436.000000, "~r~~h~ ATTACK ~w~%i x %i ~b~~h~DEFFEND");
  168. TextDrawBackgroundColor(textcont, 0x000000FF);
  169. TextDrawFont(textcont, 2);
  170. TextDrawLetterSize(textcont, 0.330000, 1.299999);
  171. TextDrawColor(textcont, 0x00FFB0FF);
  172. TextDrawSetOutline(textcont, 1);
  173. TextDrawSetProportional(textcont, 1);
  174. TextDrawSetShadow(textcont, 1);
  175. TextDrawUseBox(textcont, 1);
  176. TextDrawBoxColor(textcont, 90);
  177. TextDrawTextSize(textcont, 639.000000, 639.000000);
  178.  
  179. for(new i=0; i<MAX_PLAYERS; i++)
  180. {
  181. PinCP[i] = TextDrawCreate(100.000000, 270.000000, " ");
  182. TextDrawBackgroundColor(PinCP[i], 0x000000FF);
  183. TextDrawFont(PinCP[i], 1);
  184. TextDrawColor(PinCP[i], 0xFFFFFFFF);
  185. TextDrawLetterSize(PinCP[i], 0.330000, 1.500000);
  186. TextDrawSetProportional(PinCP[i], 1);
  187. TextDrawSetShadow(PinCP[i], 1);
  188.  
  189. cptime[i] = TextDrawCreate(293.000000, 400.000000, " ");
  190. TextDrawBackgroundColor(cptime[i], 0x000000FF);
  191. TextDrawFont(cptime[i], 1);
  192. TextDrawColor(cptime[i], 0xFFFFFFFF);
  193. TextDrawLetterSize(cptime[i], 0.300000, 0.950000);
  194. TextDrawSetProportional(cptime[i], 1);
  195. TextDrawSetOutline(cptime[i], 1);
  196. TextDrawSetShadow(cptime[i], 1);
  197.  
  198. totalp[i] = TextDrawCreate(238.000000, 423.000000, " ");
  199. TextDrawBackgroundColor(totalp[i], 0x000000FF);
  200. TextDrawFont(totalp[i], 1);
  201. TextDrawColor(totalp[i], 0xFFFFFFFF);
  202. TextDrawLetterSize(totalp[i], 0.300000, 0.950000);
  203. TextDrawSetProportional(totalp[i], 1);
  204. TextDrawSetOutline(totalp[i], 1);
  205. TextDrawSetShadow(totalp[i], 1);
  206.  
  207. /*TOTALHPATT[i] = TextDrawCreate(238.000000, 423.000000, " ");
  208. TextDrawBackgroundColor(TOTALHPATT[i], 0x000000FF);
  209. TextDrawFont(TOTALHPATT[i], 1);
  210. TextDrawColor(TOTALHPATT[i], 0xFFFFFFFF);
  211. TextDrawLetterSize(TOTALHPATT[i], 0.300000, 0.950000);
  212. TextDrawSetProportional(TOTALHPATT[i], 1);
  213. TextDrawSetOutline(TOTALHPATT[i], 1);
  214. TextDrawSetShadow(TOTALHPATT[i], 1);
  215.  
  216. TOTALHPDEF[i] = TextDrawCreate(238.000000, 423.000000, " ");
  217. TextDrawBackgroundColor(TOTALHPDEF[i], 0x000000FF);
  218. TextDrawFont(TOTALHPDEF[i], 1);
  219. TextDrawColor(TOTALHPDEF[i], 0xFFFFFFFF);
  220. TextDrawLetterSize(TOTALHPDEF[i], 0.300000, 0.950000);
  221. TextDrawSetProportional(TOTALHPDEF[i], 1);
  222. TextDrawSetOutline(TOTALHPDEF[i], 1);
  223. TextDrawSetShadow(TOTALHPDEF[i], 1);*/
  224.  
  225. }
  226.  
  227. return 1;}
  228.  
  229. public OnFilterScriptExit(){
  230. return 1;}
  231.  
  232. public OnPlayerConnect(playerid){
  233. arena[playerid] = 0;
  234. AAD_Vai[playerid] = 0;
  235. KillTimer(AAD_DominandoTimer[playerid]);
  236. PATT[playerid] = false;
  237. PDEFF[playerid] = false;
  238.  
  239. return 1;}
  240.  
  241. public OnPlayerSpawn(playerid){
  242. if(AAD_Vai[playerid] == 1) {AAD_Vai[playerid] = 0;}
  243. arena[playerid] = 0;
  244.  
  245. PATT[playerid] = false;
  246. PDEFF[playerid] = false;
  247.  
  248. if(AAD_Team[playerid] == 1 && AAD_EmProgresso == 1 && AAD_Vai[playerid] == 1){AAD_SpawnAttack(playerid);}
  249. if(AAD_Team[playerid] == 2 && AAD_EmProgresso == 1 && AAD_Vai[playerid] == 1){AAD_SpawnDeffend(playerid);}
  250.  
  251. TextDrawHideForPlayer(playerid, textcont);
  252. TextDrawHideForPlayer(playerid, PinCP[playerid]);
  253. TextDrawHideForPlayer(playerid, cptime[playerid]);
  254. TextDrawHideForPlayer(playerid, totalp[playerid]);
  255. //TextDrawHideForPlayer(playerid, TOTALHPATT[playerid]);
  256. //TextDrawHideForPlayer(playerid, TOTALHPDEF[playerid]);
  257.  
  258. return 1;}
  259.  
  260. public OnPlayerDisconnect(playerid,reason){
  261. arena[playerid] = 0;
  262. return 1;}
  263.  
  264. public OnPlayerDeath(playerid, killerid, reason)
  265. {
  266. if(AAD_Team[killerid] == 1 && AAD_EmProgresso == 1 && AAD_Vai[killerid] == 1){AAD_Kills_1++;AAD_KillsPerPlayer[killerid]++;}
  267. if(AAD_Team[killerid] == 2 && AAD_EmProgresso == 1 && AAD_Vai[killerid] == 1){AAD_Kills_2++;AAD_KillsPerPlayer[killerid]++;}
  268.  
  269. TextDrawHideForPlayer(playerid, textcont);
  270. TextDrawHideForPlayer(playerid, PinCP[playerid]);
  271. TextDrawHideForPlayer(playerid, cptime[playerid]);
  272. TextDrawHideForPlayer(playerid, totalp[playerid]);
  273. //TextDrawHideForPlayer(playerid, TOTALHPATT[playerid]);
  274. //TextDrawHideForPlayer(playerid, TOTALHPDEF[playerid]);
  275.  
  276. return 1;}
  277.  
  278. forward AAD_DominarTimer(playerid);
  279. public AAD_DominarTimer(playerid){
  280. if(IsPlayerInCheckpoint(playerid)){
  281. AAD_DominandoINT[playerid]++;
  282. PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  283. //format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~w~Dominando... ~w~%i~r~/~w~20", AAD_DominandoINT[playerid]);
  284. //GameTextForPlayer(playerid, string, 3000, 3);
  285. KillTimer(TempoMostrarText[playerid]);
  286. TextDrawShowForAll(cptime[playerid]);
  287. format(string,sizeof(string),"~w~TIME: %i~r~/~w~25", AAD_DominandoINT[playerid]);
  288. TextDrawSetString(cptime[playerid], string);
  289. MostrandoText[playerid] = 1;
  290. if(AAD_DominandoINT[playerid] >= 25){
  291. AAD_DominandoINT[playerid] = 1;
  292. KillTimer(AAD_DominandoTimer[playerid]);
  293. KillTimer(TempoMostrarText[playerid]);
  294. TextDrawShowForAll(cptime[playerid]);
  295. format(string,sizeof(string),"~w~Dominado!", AAD_DominandoINT[playerid]);
  296. TextDrawSetString(cptime[playerid], string);
  297. MostrandoText[playerid] = 1;
  298. //format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~b~Dominado!", AAD_DominandoINT[playerid]);
  299. //GameTextForPlayer(playerid, string, 5000, 3);
  300. TextDrawHideForAll(cptime[playerid]);
  301. TextDrawHideForAll(textcont);
  302. //TextDrawHideForAll(TOTALHPATT[playerid]);
  303. //TextDrawHideForAll(TOTALHPDEF[playerid]);
  304. AAD_Dominado = 1;
  305. KillTimer(AAD_Timer);
  306. AAD_DefFinalizar();
  307. return 1;}
  308.  
  309. }else{
  310. AAD_DominandoINT[playerid] = 1;
  311. KillTimer(AAD_DominandoTimer[playerid]);}
  312. return 1;}
  313.  
  314.  
  315.  
  316.  
  317.  
  318. public OnPlayerLeaveCheckpoint(playerid)
  319. {
  320.  
  321. if(AAD_Team[playerid] == 1 && AAD_EmProgresso == 1 && AAD_Vai[playerid] == 1){
  322. AAD_DominandoINT[playerid] = 1;
  323. KillTimer(AAD_DominandoTimer[playerid]);}
  324.  
  325. TextDrawHideForAll(PinCP[playerid]);
  326. TextDrawHideForAll(cptime[playerid]);
  327.  
  328. return 1;
  329. }
  330.  
  331. public OnPlayerEnterCheckpoint(playerid)
  332. {
  333.  
  334. if(AAD_Team[playerid] == 1 && AAD_EmProgresso == 1 && AAD_Vai[playerid] == 1){
  335. //SendClientMessage(playerid, cinza, "Dominando... Permaneça aqui por 25 segundos para dominar e vencer!");
  336. AAD_DominandoINT[playerid] = 1;
  337. new pnamee[MAX_PLAYER_NAME];
  338. GetPlayerName(playerid, pnamee, sizeof(pnamee));
  339. KillTimer(TempoMostrarText[playerid]);
  340. TextDrawShowForAll(PinCP[playerid]);
  341. format(string,sizeof(string),"Players in CP~n~~r~%s(ID:%i)",pnamee,playerid);
  342. TextDrawSetString(PinCP[playerid], string);
  343. MostrandoText[playerid] = 1;
  344. AAD_DominandoTimer[playerid] = SetTimerEx("AAD_DominarTimer",1000,1, "i", playerid);
  345. return 1;}
  346.  
  347. return 1;}
  348.  
  349. CMD:playersad(playerid,params[]){
  350. new ATT,DEFF;
  351. for(new i; i < GetMaxPlayers(); i++){ if(IsPlayerConnected(i)){
  352. if(PDEFF[i] == true) DEFF++;
  353. if(PATT[i] == true) ATT++;}}
  354. format(string, sizeof(string), "{FFFFFF}» Players no {FF0000}ATTACK: {FFFFFF}%i", ATT);
  355. format(string22, sizeof(string22), "{FFFFFF}» Players no {3344FF}DEFFEND: {FFFFFF}%i", DEFF);
  356. SendClientMessage(playerid, cinza, string);
  357. SendClientMessage(playerid, cinza, string22);
  358. return 1;}
  359.  
  360. CMD:startaad(playerid,params[])
  361. {
  362. if(CallRemoteFunction("GetPlayerAdminLevel","i",playerid) < 1) return SendClientMessage(playerid,cinza,"Você não tem level o suficiente");
  363. if(AAD_EmProgresso == 1 || AAD_Lobby == 1) return SendClientMessage(playerid, cinza, "{FFFFFF}» {BABABA}A base já está em execução ou em lobby");
  364. KillTimer(AAD_Timer);
  365. AAD_DefLobby();
  366. for(new i; i < GetMaxPlayers(); i++){
  367. AAD_Vai[i] = 1;
  368. PlayerPlaySound(i,1057,0.0,0.0,0.0);
  369. TogglePlayerControllable(i, false);}
  370. return 1;}
  371.  
  372.  
  373. CMD:end(playerid,params[]) {
  374. if(AAD_Vai[playerid] == 1){
  375. for(new i; i < GetMaxPlayers(); i++){
  376. if(CallRemoteFunction("GetPlayerAdminLevel","i",playerid) < 1) return SendClientMessage(playerid,cinza,"Você não tem level o suficiente");
  377. TextDrawHideForPlayer(playerid, textcont);
  378. TextDrawHideForPlayer(playerid, PinCP[playerid]);
  379. TextDrawHideForPlayer(playerid, cptime[playerid]);
  380. //TextDrawHideForPlayer(playerid, TOTALHPATT[playerid]);
  381. //TextDrawHideForPlayer(playerid, TOTALHPDEF[playerid]);
  382. arena[i] = 0;
  383. SpawnPlayer(i);
  384. DisablePlayerCheckpoint(i);}}
  385. AAD_CancelaLobby(playerid);
  386. GangZoneHideForAll(GZEB);
  387. GangZoneHideForAll(GZOF);
  388. GangZoneHideForAll(GZDO);
  389. GangZoneHideForAll(GZCAL);
  390. GangZoneHideForAll(GZBB);
  391. GangZoneHideForAll(GZAP);
  392. GangZoneHideForAll(GZLB);
  393. GangZoneHideForAll(GZMARK);
  394. GangZoneHideForAll(GZSK8);
  395. GangZoneHideForAll(GZGAN);
  396. GangZoneHideForAll(GZJH);
  397. return 1;}
  398.  
  399. CMD:noautoaad(playerid,params[]) {
  400. if(CallRemoteFunction("GetPlayerAdminLevel","i",playerid) < 4) return SendClientMessage(playerid,cinza,"Você não tem level o suficiente");
  401. if(AAD_EmProgresso == 1 || AAD_Lobby == 1) return SendClientMessage(playerid, cinza, "{FFFFFF}» {BABABA}A base já está em execução ou em lobby");
  402. KillTimer(AAD_Timer);
  403. SendClientMessage(playerid, cinza, "{FFFFFF}» {BABABA}Auto-AAD desativado!");
  404. return 1;}
  405.  
  406. CMD:autoaad(playerid,params[]) {
  407. if(CallRemoteFunction("GetPlayerAdminLevel","i",playerid) < 4) return SendClientMessage(playerid,cinza,"Você não tem level o suficiente");
  408. if(AAD_EmProgresso == 1 || AAD_Lobby == 1) return SendClientMessage(playerid, cinza, "{FFFFFF}» {BABABA}A base já está em execução ou em lobby");
  409. KillTimer(AAD_Timer);
  410. AAD_Timer = SetTimer("AAD_DefLobby",AAD_TIME_IntervaloEntrePartidas, 0);
  411. SendClientMessage(playerid, cinza, "{FFFFFF}» {BABABA}Auto-AAD ativado!");
  412. return 1;}
  413.  
  414. CMD:sairaad(playerid,params[]){
  415. if(arena[playerid] == 1){
  416. if(AAD_Vai[playerid] == 1 && AAD_EmProgresso == 1){
  417. AAD_Vai[playerid] = 0;
  418. AAD_Team[playerid] = 0;
  419. DisablePlayerCheckpoint(playerid);
  420. SetPlayerHealth(playerid,0.0);}}
  421. GangZoneHideForPlayer(playerid, GZEB);
  422. GangZoneHideForPlayer(playerid, GZOF);
  423. GangZoneHideForPlayer(playerid, GZDO);
  424. GangZoneHideForPlayer(playerid, GZCAL);
  425. GangZoneHideForPlayer(playerid, GZBB);
  426. GangZoneHideForPlayer(playerid, GZAP);
  427. GangZoneHideForPlayer(playerid, GZLB);
  428. GangZoneHideForPlayer(playerid, GZMARK);
  429. GangZoneHideForPlayer(playerid, GZSK8);
  430. GangZoneHideForPlayer(playerid, GZGAN);
  431. GangZoneHideForPlayer(playerid, GZJH);
  432. return 1;}
  433.  
  434. /*CMD:iraaffd(playerid,params[]){
  435. if(GetPlayerInterior(playerid) != 0) return SendClientMessage(playerid,cinza,"Você está dentro de um interior.");
  436. if(arena[playerid] == 1) return SendClientMessage(playerid, cinza, "Você já está em uma base");
  437. if(AAD_Vai[playerid] == 1) return SendClientMessage(playerid, cinza, "{FFFFFF}» {BABABA}Quando iniciar, você irá automaticamente para Base, aguarde.");
  438. if(AAD_Lobby == 0) return SendClientMessage(playerid, cinza, "{FFFFFF}» {BABABA}A base está indisponível no momento");
  439. AAD_Vai[playerid] = 1;
  440. format(string, sizeof(string), "{FFFFFF}» {BABABA}Você será teleportado automaticamente para a base %s, aguarde.",AAD_Local_STR);
  441. SendClientMessage(playerid, cinza, string);
  442. return 1;}*/
  443.  
  444.  
  445.  
  446. /*CMD:vc(playerid,params[]) {
  447. new tmp[256], tmp2[256], tmp3[256], Index; tmp = strval(params), tmp2 = strval(params); tmp3 = strval(params);
  448. if(!isnull(tmp)) return SendClientMessage(playerid, cinza, "{BABABA}»{FFFFFF} /v [Modelid/Name] [colour1] [colour2]");
  449. if(CallRemoteFunction("GetPlayerCash", "i", playerid) < 500) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFFFFF}» {BABABA}Você não possui dinheiro o suficiente. Necessário: $500");
  450. new car, colour1, colour2, string[128];
  451. if(!IsNumeric(tmp)) car = GetVehicleModelIDFromName(tmp); else car = strval(tmp);
  452. if(car < 400 || car > 611) return SendClientMessage(playerid, cinza, "{BABABA}» {FFFFFF} Este veiculo não é valido");
  453. if(car == 425 || car == 425) return SendClientMessage(playerid,cinza, "{BABABA}» {FFFFFF} Este veiculo não é valido");
  454. if(car == 432 || car == 432) return SendClientMessage(playerid,cinza, "{BABABA}» {FFFFFF} Este veiculo não é valido");
  455. if(car == 447 || car == 447) return SendClientMessage(playerid,cinza, "{BABABA}» {FFFFFF} Este veiculo não é valido");
  456. if(car == 520 || car == 520) return SendClientMessage(playerid,cinza, "{BABABA}» {FFFFFF} Este veiculo não é valido");
  457. if(!isnull(tmp2)) colour1 = random(126); else colour1 = strval(tmp2);
  458. if(!isnull(tmp3)) colour2 = random(126); else colour2 = strval(tmp3);
  459. CallRemoteFunction("GivePlayerCash", "ii", playerid, -500);
  460. new LVehicleID,Float:X,Float:Y,Float:Z, Float:Angle,int1; GetPlayerPos(playerid, X,Y,Z); GetPlayerFacingAngle(playerid,Angle); int1 = GetPlayerInterior(playerid);
  461. LVehicleID = CreateVehicle(car, X+3,Y,Z, Angle, colour1, colour2, -1); LinkVehicleToInterior(LVehicleID,int1); PutPlayerInVehicle(playerid,LVehicleID,0);
  462. SetVehicleVirtualWorld(LVehicleID, GetPlayerVirtualWorld(playerid));
  463. format(string, sizeof(string), "{BABABA}Voce spawnou um {FFFFFF}\"%s\" {BABABA}(Modelo:%d) cor (%d, %d)", VehicleNames[car-400], car, colour1, colour2); SendClientMessage(playerid,lightblue, string);
  464. SendClientMessage(playerid,lightblue,"{BABABA}Isso lhe custou {FFFFFF}$500");
  465. return 1;
  466. }
  467.  
  468.  
  469. CMD:vc(playerid,params[]) {
  470. if(!isnull(params)) return SendClientMessage(playerid, cinza, "{BABABA}»{FFFFFF} /v [Modelid/Name] [colour1] [colour2]");
  471. if(CallRemoteFunction("GetPlayerCash", "i", playerid) < 500) return SendClientMessage(playerid, 0xFFFFFFFF, "{FFFFFF}» {BABABA}Você não possui dinheiro o suficiente. Necessário: $500");
  472. new car, colour1, colour2, stringg[128];
  473. if(!isnull(params)) car = GetVehicleModelIDFromName(params); else car = strval(params);
  474. if(car < 400 || car > 611) return SendClientMessage(playerid, cinza, "{BABABA}» {FFFFFF} Este veiculo não é valido");
  475. if(car == 425 || car == 425) return SendClientMessage(playerid,cinza, "{BABABA}» {FFFFFF} Este veiculo não é valido");
  476. if(car == 432 || car == 432) return SendClientMessage(playerid,cinza, "{BABABA}» {FFFFFF} Este veiculo não é valido");
  477. if(car == 447 || car == 447) return SendClientMessage(playerid,cinza, "{BABABA}» {FFFFFF} Este veiculo não é valido");
  478. if(car == 520 || car == 520) return SendClientMessage(playerid,cinza, "{BABABA}» {FFFFFF} Este veiculo não é valido");
  479. CallRemoteFunction("GivePlayerCash", "ii", playerid, -500);
  480. new LVehicleID,Float:X,Float:Y,Float:Z, Float:Angle,int1; GetPlayerPos(playerid, X,Y,Z); GetPlayerFacingAngle(playerid,Angle); int1 = GetPlayerInterior(playerid);
  481. LVehicleID = CreateVehicle(car, X+3,Y,Z, Angle, colour1, colour2, -1); LinkVehicleToInterior(LVehicleID,int1); PutPlayerInVehicle(playerid,LVehicleID,0);
  482. SetVehicleVirtualWorld(LVehicleID, GetPlayerVirtualWorld(playerid));
  483. format(stringg, sizeof(stringg), "{BABABA}Voce spawnou um {FFFFFF}\"%s\"", VehicleNames[car-400]); SendClientMessage(playerid,cinza, stringg);
  484. SendClientMessage(playerid,cinza,"{BABABA}Isso lhe custou {FFFFFF}$500");
  485. return 1;
  486. }*/
  487.  
  488.  
  489.  
  490. forward AAD_CancelaLobby(adminid);
  491. public AAD_CancelaLobby(adminid){
  492. //if(AAD_Lobby == 0) return SendClientMessage(adminid, cinza,"{FFFFFF}» {BABABA}A base não pode ser cancelado a este ponto");
  493. for(new i; i < GetMaxPlayers(); i++){if(IsPlayerConnected(i)){if(AAD_Vai[i] == 1){AAD_Vai[i] = 0;}}}
  494. new pname[MAX_PLAYER_NAME];
  495. GetPlayerName(adminid, pname, sizeof(pname));
  496. format(string, sizeof(string), "{BABABA}A base %s foi encerrada por {FFFFFF}%s",AAD_Local_STR,pname);
  497. SendClientMessageToAll(cinza, string);
  498. AAD_Lobby = 0;
  499. AAD_EmProgresso = 0;
  500. KillTimer(AAD_Timer);
  501. AAD_Timer = SetTimer("AAD_DefLobby",AAD_TIME_IntervaloEntrePartidas, 0);
  502. return 1;}
  503.  
  504. forward AAD_DefIniciar();
  505. public AAD_DefIniciar(){
  506. AAD_Dominado = 0;
  507. AAD_Kills_1 = 0;
  508. AAD_Kills_2 = 0;
  509. AAD_Participantes = 0;
  510. AAD_Balancer = 0;
  511. AAD_Lobby = 0;
  512. AAD_EmProgresso = 1;
  513. for(new i; i < GetMaxPlayers(); i++){
  514. if(IsPlayerConnected(i)) {
  515. TextDrawShowForPlayer(i, textcont);
  516. TextDrawShowForPlayer(i, totalp[i]);
  517. //TextDrawShowForPlayer(i, TOTALHPATT[i]);
  518. //TextDrawShowForPlayer(i, TOTALHPDEF[i]);
  519. if(AAD_Vai[i] == 1 && arena[i] == 1) {AAD_Vai[i] = 0;}
  520. if(AAD_Vai[i] == 1){
  521. AAD_OldPlayerColor[i] = GetPlayerColor(i);
  522. AAD_Participantes++;
  523. if(AAD_Balancer == 0){
  524. AAD_Balancer = 1;
  525. AAD_Team[i] = 1;
  526. }else{
  527. AAD_Balancer = 0;
  528. AAD_Team[i] = 2;
  529. TogglePlayerControllable(i, true);}}}}
  530. if(AAD_Participantes >= 1){
  531. format(string, sizeof(string), "{BABABA}Base aleatoria iniciada{FFFFFF}: %s.",AAD_Local_STR);
  532. //{01A2F7}has randomly started Base: {FFFFFF}SF Cityhall (ID: 31)
  533. SendClientMessageToAll(cinza, string);
  534. }else{
  535. format(string, sizeof(string), "{BABABA}Base %s {FFFFFF}foi cancelada.",AAD_Local_STR);
  536. AAD_Lobby = 0;
  537. AAD_EmProgresso = 0;
  538. for(new i; i < GetMaxPlayers(); i++){
  539. if(IsPlayerConnected(i)){
  540. AAD_Vai[i] = 0;
  541. AAD_Team[i] = 0;}}
  542. AAD_Timer = SetTimer("AAD_DefLobby",AAD_TIME_IntervaloEntrePartidas, 0);
  543. return 1;}
  544. for(new i; i < GetMaxPlayers(); i++){
  545. if(IsPlayerConnected(i)) {
  546. if(AAD_Vai[i] == 1 && arena[i] == 0) {
  547. if(AAD_Team[i] == 1 && AAD_EmProgresso == 1 && AAD_Vai[i] == 1){AAD_SpawnAttack(i);AAD_KillsPerPlayer[i] = 0;}
  548. if(AAD_Team[i] == 2 && AAD_EmProgresso == 1 && AAD_Vai[i] == 1){AAD_SpawnDeffend(i);AAD_KillsPerPlayer[i] = 0;}
  549.  
  550. switch(AAD_Local){
  551. case 0:{
  552. new rand = random(sizeof(DeffendsEB));
  553. SetPlayerCheckpoint(i, DeffendsEB[rand][0], DeffendsEB[rand][1], DeffendsEB[rand][2], 2.0);
  554. SendRconCommand("mapname AAD El Quebrados");}
  555. case 1:{
  556. new rand = random(sizeof(DeffendsDO));
  557. SetPlayerCheckpoint(i, DeffendsDO[rand][0], DeffendsDO[rand][1], DeffendsDO[rand][2], 2.0);
  558. SendRconCommand("mapname AAD Docks");}
  559. case 2:{
  560. new rand = random(sizeof(DeffendsJH));
  561. SetPlayerCheckpoint(i, DeffendsJH[rand][0], DeffendsJH[rand][1], DeffendsJH[rand][2], 2.0);
  562. SendRconCommand("mapname AAD Jefferson Hotel");}
  563. case 3:{
  564. new rand = random(sizeof(DeffendsOF));
  565. SetPlayerCheckpoint(i, DeffendsOF[rand][0], DeffendsOF[rand][1], DeffendsOF[rand][2], 2.0);
  566. SendRconCommand("mapname AAD Ocean Flats");}
  567. case 4:{
  568. new rand = random(sizeof(DeffendsCAL));
  569. SetPlayerCheckpoint(i, DeffendsCAL[rand][0], DeffendsCAL[rand][1], DeffendsCAL[rand][2], 2.0);
  570. SendRconCommand("mapname AAD Come-A-Lot");}
  571. case 5:{
  572. new rand = random(sizeof(DeffendsGAN));
  573. SetPlayerCheckpoint(i, DeffendsGAN[rand][0], DeffendsGAN[rand][1], DeffendsGAN[rand][2], 2.0);
  574. SendRconCommand("mapname AAD Ganton");}
  575. case 6:{
  576. new rand = random(sizeof(DeffendsBB));
  577. SetPlayerCheckpoint(i, DeffendsBB[rand][0], DeffendsBB[rand][1], DeffendsBB[rand][2], 2.0);
  578. SendRconCommand("mapname AAD Blue Berry");}
  579. case 7:{
  580. new rand = random(sizeof(DeffendsLB));
  581. SetPlayerCheckpoint(i, DeffendsLB[rand][0], DeffendsLB[rand][1], DeffendsLB[rand][2], 2.0);
  582. SendRconCommand("mapname AAD Las Barrancas");}
  583. case 8:{
  584. new rand = random(sizeof(DeffendsMARK));
  585. SetPlayerCheckpoint(i, DeffendsMARK[rand][0], DeffendsMARK[rand][1], DeffendsMARK[rand][2], 2.0);
  586. SendRconCommand("mapname AAD Market");}
  587. case 9:{
  588. new rand = random(sizeof(DeffendsSK8));
  589. SetPlayerCheckpoint(i, DeffendsSK8[rand][0], DeffendsSK8[rand][1], DeffendsSK8[rand][2], 2.0);
  590. SendRconCommand("mapname AAD SK8");}
  591. case 10:{
  592. new rand = random(sizeof(DeffendsAP));
  593. SetPlayerCheckpoint(i, DeffendsAP[rand][0], DeffendsAP[rand][1], DeffendsAP[rand][2], 2.0);
  594. SendRconCommand("mapname AAD Angel Pine");}}
  595. }}}
  596. AAD_Timer = SetTimer("AAD_DefFinalizar",AAD_TIME_DuracaoDaPartida, 0);
  597. return 1;}
  598.  
  599.  
  600. forward AAD_SpawnAttack(i);
  601. public AAD_SpawnAttack(i){
  602. if(AAD_Team[i] == 1 && AAD_EmProgresso == 1 && AAD_Vai[i] == 1){PATT[i] = true;}
  603. SetPlayerColor(i, 0xFF0000FF);
  604. SetPlayerSkin(i, 53);
  605. SetPlayerTeam(i, 1);
  606. SetPlayerTeam(i, 1);
  607. SetPlayerVirtualWorld(i, 20);
  608. ResetPlayerWeapons(i);
  609. SetPlayerHealth(i,100);
  610. SetPlayerArmour(i,100);
  611. SetPlayerInterior(i,0);
  612. TogglePlayerControllable(i, true);
  613. arena[i] = 1;
  614.  
  615. switch(AAD_Local){
  616. case 0:{
  617. new rand = random(sizeof(AttacksEB));
  618. SetPlayerPos(i, AttacksEB[rand][0], AttacksEB[rand][1], AttacksEB[rand][2]);
  619. SetCameraBehindPlayer(i);
  620. SetPlayerFacingAngle(i,AttacksEB[rand][3]);
  621. GangZoneShowForAll(GZEB, 0xFF0000AA);}
  622. case 1:{
  623. new rand = random(sizeof(AttacksDO));
  624. SetPlayerPos(i, AttacksDO[rand][0], AttacksDO[rand][1], AttacksDO[rand][2]);
  625. SetCameraBehindPlayer(i);
  626. SetPlayerFacingAngle(i,AttacksDO[rand][3]);
  627. GangZoneShowForAll(GZDO, 0xFF0000AA);}
  628. case 2:{
  629. new rand = random(sizeof(AttacksJH));
  630. SetPlayerPos(i, AttacksJH[rand][0], AttacksJH[rand][1], AttacksJH[rand][2]);
  631. SetCameraBehindPlayer(i);
  632. SetPlayerFacingAngle(i,AttacksJH[rand][3]);
  633. GangZoneShowForAll(GZJH, 0xFF0000AA);}
  634. case 3:{
  635. new rand = random(sizeof(AttacksOF));
  636. SetPlayerPos(i, AttacksOF[rand][0], AttacksOF[rand][1], AttacksOF[rand][2]);
  637. SetCameraBehindPlayer(i);
  638. SetPlayerFacingAngle(i,AttacksOF[rand][3]);
  639. GangZoneShowForAll(GZOF, 0xFF0000AA);}
  640. case 4:{
  641. new rand = random(sizeof(AttacksCAL));
  642. SetPlayerPos(i, AttacksCAL[rand][0], AttacksCAL[rand][1], AttacksCAL[rand][2]);
  643. SetCameraBehindPlayer(i);
  644. SetPlayerFacingAngle(i,AttacksCAL[rand][3]);
  645. GangZoneShowForAll(GZCAL, 0xFF0000AA);}
  646. case 5:{
  647. new rand = random(sizeof(AttacksGAN));
  648. SetPlayerPos(i, AttacksGAN[rand][0], AttacksGAN[rand][1], AttacksGAN[rand][2]);
  649. SetCameraBehindPlayer(i);
  650. SetPlayerFacingAngle(i,AttacksGAN[rand][3]);
  651. GangZoneShowForAll(GZGAN, 0xFF0000AA);}
  652. case 6:{
  653. new rand = random(sizeof(AttacksBB));
  654. SetPlayerPos(i, AttacksBB[rand][0], AttacksBB[rand][1], AttacksBB[rand][2]);
  655. SetCameraBehindPlayer(i);
  656. SetPlayerFacingAngle(i,AttacksBB[rand][3]);
  657. GangZoneShowForAll(GZBB, 0xFF0000AA);}
  658. case 7:{
  659. new rand = random(sizeof(AttacksLB));
  660. SetPlayerPos(i, AttacksLB[rand][0], AttacksLB[rand][1], AttacksLB[rand][2]);
  661. SetCameraBehindPlayer(i);
  662. SetPlayerFacingAngle(i,AttacksLB[rand][3]);
  663. GangZoneShowForAll(GZLB, 0xFF0000AA);}
  664. case 8:{
  665. new rand = random(sizeof(AttacksMARK));
  666. SetPlayerPos(i, AttacksMARK[rand][0], AttacksMARK[rand][1], AttacksMARK[rand][2]);
  667. SetCameraBehindPlayer(i);
  668. SetPlayerFacingAngle(i,AttacksMARK[rand][3]);
  669. GangZoneShowForAll(GZMARK, 0xFF0000AA);}
  670. case 9:{
  671. new rand = random(sizeof(AttacksSK8));
  672. SetPlayerPos(i, AttacksSK8[rand][0], AttacksSK8[rand][1], AttacksSK8[rand][2]);
  673. SetCameraBehindPlayer(i);
  674. SetPlayerFacingAngle(i,AttacksSK8[rand][3]);
  675. GangZoneShowForAll(GZSK8, 0xFF0000AA);}
  676. case 10:{
  677. new rand = random(sizeof(AttacksAP));
  678. SetPlayerPos(i, AttacksAP[rand][0], AttacksAP[rand][1], AttacksAP[rand][2]);
  679. SetCameraBehindPlayer(i);
  680. SetPlayerFacingAngle(i,AttacksAP[rand][3]);}}
  681. GangZoneShowForAll(GZAP, 0xFF0000AA);
  682. GivePlayerWeapon(i, 24, 500);
  683. GivePlayerWeapon(i, 25, 500);
  684. GivePlayerWeapon(i, 34, 500);
  685. return 1;}
  686.  
  687. forward AAD_SpawnDeffend(i);
  688. public AAD_SpawnDeffend(i){
  689. if(AAD_Team[i] == 2 && AAD_EmProgresso == 1 && AAD_Vai[i] == 1){PDEFF[i] = true;}
  690. SetPlayerColor(i, 0x0000FFFF);
  691. SetPlayerSkin(i, 230);
  692. SetPlayerTeam(i, 2);
  693. SetPlayerTeam(i, 2);
  694. SetPlayerVirtualWorld(i, 20);
  695. arena[i] = 1;
  696. ResetPlayerWeapons(i);
  697. SetPlayerHealth(i,100);
  698. SetPlayerArmour(i,100);
  699. SetPlayerInterior(i,0);
  700. TogglePlayerControllable(i, true);
  701.  
  702. switch(AAD_Local){
  703. case 0:{
  704. new rand = random(sizeof(DeffendsEB));
  705. SetPlayerPos(i, DeffendsEB[rand][0], DeffendsEB[rand][1], DeffendsEB[rand][2]);
  706. SetCameraBehindPlayer(i);
  707. SetPlayerFacingAngle(i,DeffendsEB[rand][3]);}
  708. case 1:{
  709. new rand = random(sizeof(DeffendsDO));
  710. SetPlayerPos(i, DeffendsDO[rand][0], DeffendsDO[rand][1], DeffendsDO[rand][2]);
  711. SetCameraBehindPlayer(i);
  712. SetPlayerFacingAngle(i,DeffendsDO[rand][3]);}
  713. case 2:{
  714. new rand = random(sizeof(DeffendsJH));
  715. SetPlayerPos(i, DeffendsJH[rand][0], DeffendsJH[rand][1], DeffendsJH[rand][2]);
  716. SetCameraBehindPlayer(i);
  717. SetPlayerFacingAngle(i,DeffendsJH[rand][3]);}
  718. case 3:{
  719. new rand = random(sizeof(DeffendsOF));
  720. SetPlayerPos(i, DeffendsOF[rand][0], DeffendsOF[rand][1], DeffendsOF[rand][2]);
  721. SetCameraBehindPlayer(i);
  722. SetPlayerFacingAngle(i,DeffendsOF[rand][3]);}
  723. case 4:{
  724. new rand = random(sizeof(DeffendsCAL));
  725. SetPlayerPos(i, DeffendsCAL[rand][0], DeffendsCAL[rand][1], DeffendsCAL[rand][2]);
  726. SetCameraBehindPlayer(i);
  727. SetPlayerFacingAngle(i,DeffendsCAL[rand][3]);}
  728. case 5:{
  729. new rand = random(sizeof(DeffendsGAN));
  730. SetPlayerPos(i, DeffendsGAN[rand][0], DeffendsGAN[rand][1], DeffendsGAN[rand][2]);
  731. SetCameraBehindPlayer(i);
  732. SetPlayerFacingAngle(i,DeffendsGAN[rand][3]);}
  733. case 6:{
  734. new rand = random(sizeof(DeffendsBB));
  735. SetPlayerPos(i, DeffendsBB[rand][0], DeffendsBB[rand][1], DeffendsBB[rand][2]);
  736. SetCameraBehindPlayer(i);
  737. SetPlayerFacingAngle(i,DeffendsBB[rand][3]);}
  738. case 7:{
  739. new rand = random(sizeof(DeffendsLB));
  740. SetPlayerPos(i, DeffendsLB[rand][0], DeffendsLB[rand][1], DeffendsLB[rand][2]);
  741. SetCameraBehindPlayer(i);
  742. SetPlayerFacingAngle(i,DeffendsLB[rand][3]);}
  743. case 8:{
  744. new rand = random(sizeof(DeffendsMARK));
  745. SetPlayerPos(i, DeffendsMARK[rand][0], DeffendsMARK[rand][1], DeffendsMARK[rand][2]);
  746. SetCameraBehindPlayer(i);
  747. SetPlayerFacingAngle(i,DeffendsMARK[rand][3]);}
  748. case 9:{
  749. new rand = random(sizeof(DeffendsSK8));
  750. SetPlayerPos(i, DeffendsSK8[rand][0], DeffendsSK8[rand][1], DeffendsSK8[rand][2]);
  751. SetCameraBehindPlayer(i);
  752. SetPlayerFacingAngle(i,DeffendsSK8[rand][3]);}
  753. case 10:{
  754. new rand = random(sizeof(DeffendsAP));
  755. SetPlayerPos(i, DeffendsAP[rand][0], DeffendsAP[rand][1], DeffendsAP[rand][2]);
  756. SetCameraBehindPlayer(i);
  757. SetPlayerFacingAngle(i,DeffendsAP[rand][3]);}}
  758. GivePlayerWeapon(i, 24, 500);
  759. GivePlayerWeapon(i, 25, 500);
  760. GivePlayerWeapon(i, 34, 500);
  761. return 1;}
  762.  
  763. forward AAD_DefFinalizar();
  764. public AAD_DefFinalizar()
  765. {
  766. AAD_Lobby = 0;
  767. AAD_EmProgresso = 0;
  768.  
  769. new MaiorKill = 0;
  770. for(new x,a = GetMaxPlayers();x < a;x++){if(IsPlayerConnected(x)){
  771. if(AAD_Vai[x] == 1){
  772. if(AAD_Team[x] != 0){
  773. if(AAD_KillsPerPlayer[x] >= MaiorKill) {
  774. MaiorKill = AAD_KillsPerPlayer[x];
  775. AAD_TopKillerID = x;}}}}}
  776.  
  777. AAD_TopKillerID_Kills = MaiorKill;
  778. GetPlayerName(AAD_TopKillerID, AAD_TopKillerID_NAME, sizeof(AAD_TopKillerID_NAME));
  779.  
  780. if(AAD_TopKillerID_Kills < 1){
  781. AAD_TopKillerID = 0;
  782. AAD_TopKillerID_Kills = 0;
  783. AAD_TopKillerID_NAME = "{FFFFFF}NONE";}
  784.  
  785. if(AAD_Dominado == 1){
  786. AAD_Vencedor = 1;
  787. AAD_Vencedor_STR = "{FF0000}ATTACK";
  788. AAD_Vencedor = 1;}else{
  789. AAD_Vencedor = 2;
  790. AAD_Vencedor_STR = "{3344FF}DEFFEND";}
  791.  
  792. for(new i; i < GetMaxPlayers(); i++){if(IsPlayerConnected(i)){
  793. if(AAD_Vai[i] == 1){
  794. DisablePlayerCheckpoint(i);
  795. GangZoneHideForAll(GZEB);
  796. GangZoneHideForAll(GZOF);
  797. GangZoneHideForAll(GZDO);
  798. GangZoneHideForAll(GZCAL);
  799. GangZoneHideForAll(GZBB);
  800. GangZoneHideForAll(GZAP);
  801. GangZoneHideForAll(GZLB);
  802. GangZoneHideForAll(GZMARK);
  803. GangZoneHideForAll(GZSK8);
  804. GangZoneHideForAll(GZGAN);
  805. GangZoneHideForAll(GZJH);
  806. SetPlayerColor(i, AAD_OldPlayerColor[i]);
  807. TextDrawHideForPlayer(i, textcont);
  808. TextDrawHideForPlayer(i, totalp[i]);
  809. //TextDrawHideForPlayer(i, TOTALHPATT[i]);
  810. //TextDrawHideForPlayer(i, TOTALHPDEF[i]);
  811. SpawnPlayer(i);}
  812. AAD_Vai[i] = 0;
  813. AAD_Team[i] = 0;}}
  814. SendClientMessageToAll(cinza, " ");
  815. SendClientMessageToAll(cinza, " ");
  816. SendClientMessageToAll(cinza, " ");
  817. SendClientMessageToAll(cinza, " ");
  818. SendClientMessageToAll(cinza, " ");
  819. SendClientMessageToAll(cinza, " ");
  820. SendClientMessageToAll(cinza, " ");
  821. SendClientMessageToAll(cinza, " ");
  822. SendClientMessageToAll(cinza, " ");
  823. SendClientMessageToAll(cinza, " ");
  824. new str[150];
  825. new str2[200];
  826. new str3[100];
  827. //format(string, sizeof(string), "{FFFFFF}AAD: {BABABA}%s {FFFFFF}Team won: %s | Kills: [Attack %i x %i Deffend] [The BEST: {BABABA}%s {FFFFFF}| %i kills]",AAD_Local_STR,AAD_Vencedor_STR,AAD_Kills_1,AAD_Kills_2,AAD_TopKillerID_NAME,AAD_TopKillerID_Kills);
  828. SendClientMessageToAll(cinza, "{FFFFFF}===================================");
  829. format(string, sizeof(string), "{FFFFFF}AAD: %s",AAD_Local_STR);
  830. SendClientMessageToAll(cinza, string);
  831. format(str, sizeof(str), "{FFFFFF}Team won: %s",AAD_Vencedor_STR);
  832. SendClientMessageToAll(cinza, str);
  833. format(str2, sizeof(str2), "{FFFFFF}Kills: [{FF0000}Attack {FFFFFF}%i x %i {3344FF}Deffend]",AAD_Kills_1,AAD_Kills_2);
  834. SendClientMessageToAll(cinza, str2);
  835. format(str3, sizeof(str3), "The Best: %s {FFFFFF}| %i kills",AAD_TopKillerID_NAME,AAD_TopKillerID_Kills);
  836. SendClientMessageToAll(cinza, str3);
  837. SendClientMessageToAll(cinza, "{FFFFFF}===================================");
  838. if(AAD_TopKillerID == 0){/*NADA AQUI*/}
  839. if(AAD_Vencedor == 0){/*NADA AQUI*/}
  840. AAD_Timer = SetTimer("AAD_DefLobby",AAD_TIME_IntervaloEntrePartidas, 0);}
  841.  
  842. forward AAD_DefLobby();
  843. public AAD_DefLobby(){
  844. AAD_Local = random(11);
  845. switch(AAD_Local){
  846. case 0: AAD_Local_STR = "El Quebrados";
  847. case 1: AAD_Local_STR = "Docks";
  848. case 2: AAD_Local_STR = "Jefferson Hotel";
  849. case 3: AAD_Local_STR = "Ocean Flats";
  850. case 4: AAD_Local_STR = "Come-A-Lot";
  851. case 5: AAD_Local_STR = "Ganton";
  852. case 6: AAD_Local_STR = "Blue Berry";
  853. case 7: AAD_Local_STR = "Las Barrancas";
  854. case 8: AAD_Local_STR = "Market";
  855. case 9: AAD_Local_STR = "SK8";
  856. case 10: AAD_Local_STR = "Angel Pine";}
  857. AAD_Lobby = 0;
  858. for(new i; i < GetMaxPlayers(); i++){if(IsPlayerConnected(i)){
  859. AAD_Vai[i] = 0;
  860. AAD_Team[i] = 0;}}
  861. AAD_Lobby = 1;
  862. AAD_EmProgresso = 0;
  863. format(string, sizeof(string), "{FFFFFF}Base {BABABA}%s {FFFFFF}iniciando em 5 {BABABA}segundos",AAD_Local_STR);
  864. SendClientMessageToAll(cinza, string);
  865. AAD_Timer = SetTimer("AAD_DefIniciar",AAD_TIME_TempoDeEsperaLobby, 0);}
  866.  
  867.  
  868. forward TimerPorSegundo(playerid);
  869. public TimerPorSegundo(playerid)
  870. {
  871. AttCONTAGEM();
  872. checkarplayers();
  873. AttTotalp(playerid);
  874. //AttTOTALHPATT(playerid);
  875. //AttTOTALHPDEF(playerid);
  876. return 1;
  877. }
  878.  
  879. forward HideTextoText(playerid);
  880. public HideTextoText(playerid)
  881. {
  882. if(MostrandoText[playerid] == 1)
  883. {
  884. TextDrawHideForAll(PinCP[playerid]);
  885. MostrandoText[playerid] = 0;
  886. }
  887. return 1;
  888. }
  889.  
  890. stock AttCONTAGEM()
  891. {
  892. format(string, sizeof(string), " ~r~~h~Attack ~w~(%i) x (%i) ~b~~h~Deffend", AAD_Kills_1,AAD_Kills_2);
  893. TextDrawSetString(textcont, string);
  894. return 1;
  895. }
  896.  
  897. stock AttTotalp(playerid)
  898. {
  899.  
  900. new ATT,DEFF;
  901. for(new i; i < GetMaxPlayers(); i++){ if(IsPlayerConnected(i)){
  902. if(PDEFF[i] == true) DEFF++;
  903. if(PATT[i] == true) ATT++;
  904. format(string, sizeof(string), "(~r~~h~%i~w~) (~b~~h~%i~w~)", ATT,DEFF);
  905. TextDrawSetString(totalp[playerid], string);}}
  906. return 1;
  907. }
  908.  
  909. /*stock AttTOTALHPATT(playerid)
  910. {
  911. for(new i; i < GetMaxPlayers(); i++){ if(IsPlayerConnected(i)){
  912. if(AAD_Team[i] == 1){
  913. new Float:life, Float:colete, Float:totallife;
  914. GetPlayerHealth(i, Float:life);
  915. GetPlayerArmour(i, Float:colete);
  916. totallife = life + colete;
  917. format(string, sizeof(string)," HP: %i", floatround(totallife));
  918. TextDrawSetString(TOTALHPATT[playerid], string);
  919. TextDrawShowForAll(TOTALHPATT[playerid]);}}}
  920. return 1;
  921. }
  922.  
  923. stock AttTOTALHPDEF(playerid)
  924. {
  925. for(new i; i < GetMaxPlayers(); i++){ if(IsPlayerConnected(i)){
  926. if(AAD_Team[i] == 2){
  927. new Float:lfafife, Float:coletbbe, Float:safaf;
  928. GetPlayerHealth(i, Float:lfafife);
  929. GetPlayerArmour(i, Float:coletbbe);
  930. safaf = lfafife + coletbbe;
  931. format(string, sizeof(string)," HP: %i", floatround(safaf));
  932. TextDrawSetString(TOTALHPDEF[playerid], string);
  933. TextDrawShowForAll(TOTALHPDEF[playerid]);}}}
  934. return 1;
  935. }*/
  936.  
  937. stock checkarplayers()
  938. {
  939. if(AAD_Participantes <= 0 && AAD_EmProgresso == 1){
  940. AAD_DefFinalizar();
  941. KillTimer(AAD_Timer);
  942. AAD_EmProgresso = 0;
  943. for(new i; i < GetMaxPlayers(); i++){if(IsPlayerConnected(i)){
  944. arena[i] = 0;}}}
  945. return 1;}
  946.  
  947.  
  948. forward spawnarnoad(playerid);
  949. public spawnarnoad(playerid){
  950. if(AAD_Team[playerid] == 1 && AAD_EmProgresso == 1 && AAD_Vai[playerid] == 1){AAD_SpawnAttack(playerid);}
  951. if(AAD_Team[playerid] == 2 && AAD_EmProgresso == 1 && AAD_Vai[playerid] == 1){AAD_SpawnDeffend(playerid);}
  952. return 1;}
  953.  
  954. stock IsNumeric(sftring[])
  955. {
  956. for (new i = 0, j = strlen(sftring); i < j; i++)
  957. {
  958. if (sftring[i] > '9' || sftring[i] < '0') return 0;
  959. }
  960. return 1;
  961. }
Advertisement
Add Comment
Please, Sign In to add comment