Advertisement
Coringa253

CM Evento

Oct 12th, 2015
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 16.52 KB | None | 0 0
  1. /*
  2. CM - Evento Creditos:
  3. ~> Coringa253
  4. ~> BatMan253
  5. ~> Robben253
  6. */
  7. #include <a_samp>
  8. #include <zcmd>
  9.  
  10. #define FILTERSCRIPT    true
  11. #define Cor_Evento      0xD7D7D7FF
  12.  
  13.  
  14.  
  15. enum E_INFO
  16. {
  17.     CMEventoAtivado
  18. }
  19.  
  20. forward UnfreezePlayers();
  21.  
  22. new EventInfo[E_INFO];
  23. new giveplayer[MAX_PLAYER_NAME];
  24. new sendername[MAX_PLAYER_NAME];
  25. new playa;
  26.  
  27. new Float:RandomSpawns[30][] = {
  28. {1412.2595,6.1298,1000.9219,180.9003}, //
  29. {1408.0437,6.1806,1000.9251,177.1402}, //
  30. {1403.1508,6.1258,1000.9059,174.6335}, //
  31. {1398.0273,5.9584,1000.9063,185.9137}, //
  32. {1381.0830,5.6821,1000.9166,183.4070}, //
  33. {1373.4424,6.2396,1000.9163,175.8869}, //
  34. {1368.2979,6.1590,1000.9200,177.4536}, //
  35. {1360.3193,6.3505,1000.9219,179.6470}, //
  36. {1359.6257,-2.4310,1000.9219,275.8412}, //
  37. {1360.0743,-7.8997,1000.9219,268.9478}, //
  38. {1360.1553,-14.3356,1000.9219,264.5611}, //
  39. {1360.0851,-21.2351,1000.9219,260.1510}, //
  40. {1360.0441,-27.1327,1000.9219,264.5378}, //
  41. {1360.0824,-33.6543,1000.9219,278.3245}, //
  42. {1360.0995,-38.4936,1000.9219,275.1912}, //
  43. {1359.9139,-45.6904,1000.9254,272.9978}, //
  44. {1365.9270,-48.2096,1000.9162,0.1053}, //
  45. {1371.3363,-47.7785,1000.9165,356.9719}, //
  46. {1376.5577,-47.6267,1000.9184,356.0320}, //
  47. {1382.5784,-47.3322,1000.9216,3.8653}, //
  48. {1389.0518,-47.3623,1000.9244,356.6586}, //
  49. {1395.5378,-47.5278,1000.9251,3.2387}, //
  50. {1401.5302,-47.5923,1000.9088,354.4653}, //
  51. {1409.2939,-47.4446,1000.9229,7.6255}, //
  52. {1417.9374,-47.3752,1000.9294,2.6121}, //
  53. {1418.2668,-42.5882,1000.9227,88.7796}, //
  54. {1418.5240,-37.9459,1000.9272,83.7662}, //
  55. {1418.0388,-31.0613,1000.9270,93.7930}, //
  56. {1417.7113,-23.9086,1000.9269,87.8162}, //
  57. {1418.2236,-14.0434,1000.9271,90.0095} //
  58.  
  59. };
  60.  
  61. #if FILTERSCRIPT == true
  62. public OnFilterScriptInit()
  63. {
  64.     print("\n ___________________________________________________");
  65.     print("                     CM-Evento Ligado.                                ");
  66.     print(" _____________________________________________________\n");
  67.     EventInfo[CMEventoAtivado]=0;
  68.     return 1;
  69. }
  70.  
  71. public OnFilterScriptExit()
  72. {
  73.     print("\n ___________________________________________________");
  74.     print("                     CM-Evento Desligado.                                 ");
  75.     print(" _____________________________________________________\n");
  76.     return 1;
  77. }
  78. #endif
  79.  
  80. //==================[Evento Deagle]===========================//
  81. new string[256];
  82. new Name[24];
  83. CMD:adevento(playerid, params[])
  84. {
  85.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "{F81414}~> Você não pode usar este comando!");
  86.     EventInfo[CMEventoAtivado]=1;
  87.     GetPlayerName(playerid, Name, sizeof(Name));
  88.     format(string, 256, "{6EF83C}[CM-Evento]: Evento Deagle ativado por admin {FFFFFF} %s ! {6EF83C}(/jdevento) ", Name);
  89.     return SendClientMessageToAll(Cor_Evento, string);
  90. }
  91. CMD:ddevento(playerid, params[])
  92. {
  93.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "{F81414}~> Você não pode usar este comando!");
  94.     EventInfo[CMEventoAtivado]=0;
  95.     SetTimer(#UnfreezePlayers, (5 * 1000), false);
  96.     GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  97.     format(string, 256, "{6EF83C}[CM-Evento]: Evento Deagle desativado por admin {FFFFFF} %s ! ", giveplayer, sendername, Name);
  98.     return SendClientMessageToAll(Cor_Evento, string);
  99. }
  100. CMD:jdevento(playerid, params[])
  101. {
  102.     if(EventInfo[CMEventoAtivado] == 0) return SendClientMessage(playerid, Cor_Evento, "{6EF83C}| ERRO | Nenhum evento não está ativo!");
  103.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Cor_Evento, "Você não deveria estar em qualquer veículo para usar ordem!");
  104.     new Random = random(30);
  105.     SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
  106.     SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
  107.     SetPlayerInterior(playerid, 1);
  108.     TogglePlayerControllable(playerid, false);
  109.     GivePlayerWeapon(playerid, 24, 999);
  110.     SetPlayerArmour(playerid, 100);
  111.     return SendClientMessage(playerid, Cor_Evento, "{6EF83C}[CM-Evento]: Evento Deagle!");
  112. }
  113. //==================[Evento Molotov Cocktail ]===========================//
  114. CMD:amcevento(playerid, params[])
  115. {
  116.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "{F81414}~> Você não pode usar este comando!");
  117.     EventInfo[CMEventoAtivado]=1;
  118.     GetPlayerName(playerid, Name, sizeof(Name));
  119.     format(string, 256, "{6EF83C}[CM-Evento]: Molotov Cocktail Evento habilitado por admin {FFFFFF} %s ! {6EF83C}(/jmcevento) ", giveplayer, sendername, Name);
  120.     return SendClientMessageToAll(Cor_Evento, string);
  121. }
  122. CMD:dmcevento(playerid, params[])
  123. {
  124.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "{F81414}~> Você não pode usar este comando!");
  125.     EventInfo[CMEventoAtivado]=0;
  126.     SetTimer(#UnfreezePlayers, (5 * 1000), false);
  127.     GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  128.     format(string, 256, "{6EF83C}[CM-Evento]: Cocktail Molotov Evento desativado por admin {FFFFFF} %s ! ", giveplayer, sendername, Name);
  129.     return SendClientMessageToAll(Cor_Evento, string);
  130. }
  131. CMD:jmcevento(playerid, params[])
  132. {
  133.     if(EventInfo[CMEventoAtivado] == 0) return SendClientMessage(playerid, Cor_Evento, "{6EF83C}| ERRO | Nenhum evento ativo!");
  134.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Cor_Evento, "Você não deveria estar em qualquer veículo para usar ordem!");
  135.     new Random = random(30);
  136.     SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
  137.     SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
  138.     SetPlayerInterior(playerid, 1);
  139.     TogglePlayerControllable(playerid, false);
  140.     GivePlayerWeapon(playerid, 18, 999);
  141.     SetPlayerArmour(playerid, 100);
  142.     return SendClientMessage(playerid, Cor_Evento, "{6EF83C}[CM-Evento]: Molotov Evento!");
  143. }
  144. //==================[Evento Granada]===========================//
  145. CMD:agevento(playerid, params[])
  146. {
  147.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "{F81414}~> Você não pode usar este comando!");
  148.     EventInfo[CMEventoAtivado]=1;
  149.     GetPlayerName(playerid, Name, sizeof(Name));
  150.     format(string, 256, "{6EF83C}[CM-Evento]: Evento granada ativado por admin {FFFFFF} %s ! {6EF83C}(/jgevento) ", giveplayer, sendername, Name);
  151.     return SendClientMessageToAll(Cor_Evento, string);
  152. }
  153. CMD:dgevento(playerid, params[])
  154. {
  155.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "{F81414}~> Você não pode usar este comando!");
  156.     EventInfo[CMEventoAtivado]=0;
  157.     SetTimer(#UnfreezePlayers, (5 * 1000), false);
  158.     GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  159.     format(string, 256, "{6EF83C}[CM-Evento]: Evento granada desativada por admin {FFFFFF} %s ! ", giveplayer, sendername, Name);
  160.     return SendClientMessageToAll(Cor_Evento, string);
  161. }
  162. CMD:jgevento(playerid, params[])
  163. {
  164.     if(EventInfo[CMEventoAtivado] == 0) return SendClientMessage(playerid, Cor_Evento, "{6EF83C}| ERRO | Nenhum evento ativo!");
  165.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Cor_Evento, "Você não deveria estar em qualquer veículo para usar ordem!");
  166.     new Random = random(30);
  167.     SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
  168.     SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
  169.     SetPlayerInterior(playerid, 1);
  170.     TogglePlayerControllable(playerid, false);
  171.     GivePlayerWeapon(playerid, 16, 999);
  172.     SetPlayerArmour(playerid, 100);
  173.     return SendClientMessage(playerid, Cor_Evento, "{6EF83C}[CM-Evento]: Evento granada!");
  174. }
  175. //==================[Evento Bastão de Beisebol]===========================//
  176. CMD:abevento(playerid, params[])
  177. {
  178.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "{F81414}~> Você não pode usar este comando!");
  179.     EventInfo[CMEventoAtivado]=1;
  180.     GetPlayerName(playerid, Name, sizeof(Name));
  181.     format(string, 256, "{6EF83C}[CM-Evento]: Bastão de beisebol ativado por admin {FFFFFF} %s ! {6EF83C}(/jbevento) ", giveplayer, sendername, Name);
  182.     return SendClientMessageToAll(Cor_Evento, string);
  183. }
  184. CMD:dbevento(playerid, params[])
  185. {
  186.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "{F81414}~> Você não pode usar este comando!");
  187.     EventInfo[CMEventoAtivado]=0;
  188.     SetTimer(#UnfreezePlayers, (5 * 1000), false);
  189.     GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  190.     format(string, 256, "{6EF83C}[CM-Evento]: Bastão de beisebol desativado por admin {FFFFFF} %s ! ", giveplayer, sendername, Name);
  191.     return SendClientMessageToAll(Cor_Evento, string);
  192. }
  193. CMD:jbevento(playerid, params[])
  194. {
  195.     if(EventInfo[CMEventoAtivado] == 0) return SendClientMessage(playerid, Cor_Evento, "{6EF83C}| ERRO | Nenhum evento ativo!");
  196.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Cor_Evento, "Você não deveria estar em qualquer veículo para usar ordem!");
  197.     new Random = random(30);
  198.     SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
  199.     SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
  200.     SetPlayerInterior(playerid, 1);
  201.     TogglePlayerControllable(playerid, false);
  202.     GivePlayerWeapon(playerid, 5, 999);
  203.     SetPlayerArmour(playerid, 100);
  204.     return SendClientMessage(playerid, Cor_Evento, "{6EF83C}[CM-Evento]: Evento bastão de beisebol!");
  205. }
  206. //==================[Evento SMG]===========================//
  207. CMD:asevento(playerid, params[])
  208. {
  209.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "{F81414}~> Você não pode usar este comando!");
  210.     EventInfo[CMEventoAtivado]=1;
  211.     GetPlayerName(playerid, Name, sizeof(Name));
  212.     format(string, 256, "{6EF83C}[CM-Evento]: Evento SMG habilitado por admin {FFFFFF} %s !  {6EF83C}(/jsevento) ", giveplayer, sendername, Name);
  213.     return SendClientMessageToAll(Cor_Evento, string);
  214. }
  215. CMD:dsevento(playerid, params[])
  216. {
  217.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "{F81414}~> Você não pode usar este comando!");
  218.     EventInfo[CMEventoAtivado]=0;
  219.     SetTimer(#UnfreezePlayers, (5 * 1000), false);
  220.     GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  221.     format(string, 256, "{6EF83C}[CM-Evento]: Evento SMG desativado por admin {FFFFFF} %s ! ", giveplayer, sendername, Name);
  222.     return SendClientMessageToAll(Cor_Evento, string);
  223. }
  224. CMD:jsevento(playerid, params[])
  225. {
  226.     if(EventInfo[CMEventoAtivado] == 0) return SendClientMessage(playerid, Cor_Evento, "{6EF83C}| ERRO | Nenhum evento ativo!");
  227.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Cor_Evento, "Você não deveria estar em qualquer veículo para usar ordem!");
  228.     new Random = random(30);
  229.     SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
  230.     SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
  231.     SetPlayerInterior(playerid, 1);
  232.     TogglePlayerControllable(playerid, false);
  233.     GivePlayerWeapon(playerid, 28, 999);
  234.     SetPlayerArmour(playerid, 100);
  235.     return SendClientMessage(playerid, Cor_Evento, "{6EF83C}[CM-Evento]: Evento SMG!");
  236. }
  237. //==================[Evento Combat ShotGun]===========================//
  238. CMD:acsevento(playerid, params[])
  239. {
  240.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "{F81414}~> Você não pode usar este comando!");
  241.     EventInfo[CMEventoAtivado]=1;
  242.     GetPlayerName(playerid, Name, sizeof(Name));
  243.     format(string, 256, "{6EF83C}[CM-Evento]: Evento Combat Shotgun habilitado por admin {FFFFFF} %s ! {6EF83C}(/jcsevento) ", giveplayer, sendername, Name);
  244.     return SendClientMessageToAll(Cor_Evento, string);
  245. }
  246. CMD:dcsevento(playerid, params[])
  247. {
  248.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "{F81414}~> Você não pode usar este comando!");
  249.     EventInfo[CMEventoAtivado]=0;
  250.     SetTimer(#UnfreezePlayers, (5 * 1000), false);
  251.     GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  252.     format(string, 256, "{6EF83C}[CM-Evento]: Evento Combat Shotgun desativado por admin {FFFFFF} %s ! ", giveplayer, sendername, Name);
  253.     return SendClientMessageToAll(Cor_Evento, string);
  254. }
  255. CMD:jcsevento(playerid, params[])
  256. {
  257.     if(EventInfo[CMEventoAtivado] == 0) return SendClientMessage(playerid, Cor_Evento, "| ERRO | Nenhum evento ativo!");
  258.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Cor_Evento, "Você não deveria estar em qualquer veículo para usar ordem!");
  259.     new Random = random(30);
  260.     SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
  261.     SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
  262.     SetPlayerInterior(playerid, 1);
  263.     TogglePlayerControllable(playerid, false);
  264.     GivePlayerWeapon(playerid, 27, 999);
  265.     SetPlayerArmour(playerid, 100);
  266.     return SendClientMessage(playerid, Cor_Evento, "{6EF83C}[CM-Evento]: Evento Combat Shotgun !");
  267. }
  268. //==================[Evento Livre]===========================//
  269. CMD:alevento(playerid, params[])
  270. {
  271.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "{F81414}~> Você não pode usar este comando!");
  272.     EventInfo[CMEventoAtivado]=1;
  273.     GetPlayerName(playerid, Name, sizeof(Name));
  274.     format(string, 256, "{6EF83C}[CM-Evento]: Evento activado por admin {FFFFFF} %s ! {6EF83C}(/jlevento) ", giveplayer, sendername, Name);
  275.     return SendClientMessageToAll(Cor_Evento, string);
  276. }
  277. CMD:dlevento(playerid, params[])
  278. {
  279.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "{F81414}~> Você não pode usar este comando!");
  280.     EventInfo[CMEventoAtivado]=0;
  281.     SetTimer(#UnfreezePlayers, (5 * 1000), false);
  282.     GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  283.     format(string, 256, "{6EF83C}[CM-Evento]: Evento desativado por admin {FFFFFF} %s ! ", giveplayer, sendername, Name);
  284.     return SendClientMessageToAll(Cor_Evento, string);
  285. }
  286. CMD:jlevento(playerid, params[])
  287. {
  288.     if(EventInfo[CMEventoAtivado] == 0) return SendClientMessage(playerid, Cor_Evento, "| ERRO | Nenhum evento ativo!");
  289.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, Cor_Evento, "Você não deveria estar em qualquer veículo para usar ordem!");
  290.     new Random = random(30);
  291.     SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
  292.     SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
  293.     SetPlayerInterior(playerid, 1);
  294.     TogglePlayerControllable(playerid, false);
  295.     GivePlayerWeapon(playerid, 27, 999);
  296.     SetPlayerArmour(playerid, 100);
  297.     return SendClientMessage(playerid, Cor_Evento, "{6EF83C}[CM-Evento]: Evento !");
  298. }
  299. CMD:cmdevento(playerid, params[])
  300. {
  301.     if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Cor_Evento, "~> Você não pode usar este comando!");
  302.     SendClientMessage(playerid, Cor_Evento,"{6EF83C}---------------------------------------------------------------------------");
  303.     SendClientMessage(playerid, Cor_Evento,"{0049FF}[Evento Deagle]:{FFFFFF} /adevento | /ddevento | /jdevento");
  304.     SendClientMessage(playerid, Cor_Evento,"{0049FF}[Evento Molotov]: {FFFFFF}/amcevento | /dmcevento | /jmcevento");
  305.     SendClientMessage(playerid, Cor_Evento,"{0049FF}[Evento Grenade]:{FFFFFF} /agevento | /dgevento | /jgevento");
  306.     SendClientMessage(playerid, Cor_Evento,"{0049FF}[Evento Baseball]:{FFFFFF} /abevento | /dbevento | /jbevento");
  307.     SendClientMessage(playerid, Cor_Evento,"{0049FF}[Evento SMG]: {FFFFFF}/asevento | /dsevento | /jsevento");
  308.     SendClientMessage(playerid, Cor_Evento,"{0049FF}[Evento Combat Shotgun]: {FFFFFF}/acsevento | /dcsevento | /jcsevento");
  309.     SendClientMessage(playerid, Cor_Evento,"{0049FF}[Evento Livre]: {FFFFFF}/alevento | /dlevento | /jlevento");
  310.     return SendClientMessage(playerid, Cor_Evento,"{6EF83C}--------------------------------------------------------------------");
  311. }
  312.  
  313. CMD:cmecreditos(playerid, params[])
  314. {
  315.     SendClientMessage(playerid, Cor_Evento,"{6EF83C}---------------------------------------------------------------------------");
  316.     SendClientMessage(playerid, Cor_Evento,"{0049FF}[Scripter]:{FFFFFF} Coringa253");
  317.     SendClientMessage(playerid, Cor_Evento,"{0049FF}[Ajudante]: {FFFFFF} BatMan253");
  318.     SendClientMessage(playerid, Cor_Evento,"{0049FF}[Ajudante]: {FFFFFF} Robben253");
  319.     return SendClientMessage(playerid, Cor_Evento,"{6EF83C}--------------------------------------------------------------------");
  320. }
  321.  
  322. public UnfreezePlayers()
  323. {
  324.       for(new p; p != MAX_PLAYERS; ++p){
  325.       if(IsPlayerConnected(p)){
  326.       TogglePlayerControllable(p, true);
  327.       SendClientMessage(p, Cor_Evento,"{0049FF}[Info CM-Evento]: {FFFFFF}Evento descongelado !!!");}}
  328. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement