Advertisement
EOussama

EO_Explosives Shop version 1.0

Dec 8th, 2016
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 60.64 KB | None | 0 0
  1. /*
  2.  
  3.  
  4.                                                                           _____                   _______
  5.                                                                          /\    \                 /::\    \
  6.                                                                         /::\    \               /::::\    \
  7.                                                                        /::::\    \             /::::::\    \
  8.                                                                       /::::::\    \           /::::::::\    \
  9.                                                                      /:::/\:::\    \         /:::/~~\:::\    \
  10.                                                                     /:::/__\:::\    \       /:::/    \:::\    \
  11.                                                                    /::::\   \:::\    \     /:::/    / \:::\    \
  12.                                                                   /::::::\   \:::\    \   /:::/____/   \:::\____\
  13.                                                                  /:::/\:::\   \:::\    \ |:::|    |     |:::|    |
  14.                                                                 /:::/__\:::\   \:::\____\|:::|____|     |:::|    |
  15.                                                                 \:::\   \:::\   \::/    / \:::\    \   /:::/    /
  16.                                                                  \:::\   \:::\   \/____/   \:::\    \ /:::/    /
  17.                                                                   \:::\   \:::\    \        \:::\    /:::/    /
  18.                                                                    \:::\   \:::\____\        \:::\__/:::/    /
  19.                                                                     \:::\   \::/    /         \::::::::/    /
  20.                                                                      \:::\   \/____/           \::::::/    /
  21.                                                                       \:::\    \                \::::/    /
  22.                                                                        \:::\____\                \::/____/
  23.                                                                         \::/    /                 ~~
  24.                                                                          \/____/
  25.  
  26.  
  27.  
  28.                                               ______ ____   ______            _           _                   _____ _
  29.                                              |  ____/ __ \ |  ____|          | |         (_)                 / ____| |
  30.                                              | |__ | |  | || |__  __  ___ __ | | ___  ___ ___   _____  ___  | (___ | |__   ___  _ __
  31.                                              |  __|| |  | ||  __| \ \/ / '_ \| |/ _ \/ __| \ \ / / _ \/ __|  \___ \| '_ \ / _ \| '_ \
  32.                                              | |___| |__| || |____ >  <| |_) | | (_) \__ \ |\ V /  __/\__ \  ____) | | | | (_) | |_) |
  33.                                              |______\____/ |______/_/\_\ .__/|_|\___/|___/_| \_/ \___||___/ |_____/|_| |_|\___/| .__/
  34.                                                        ______          | |                                                     | |
  35.                                                       |______|         |_|                                                     |_|
  36.                                                                                 EO_Explosives Shop
  37.  
  38.  
  39.  
  40.  
  41.  
  42. **CopyRight Claim: Please do not upload this or edit it without my permission, as it still on the developement stage,
  43.  
  44. Machines
  45. 3d texts
  46. fireworks
  47. /esp
  48. /saving system
  49.  
  50. **************
  51.  
  52. vehicle can't use bomb
  53. rc car and drone
  54. barrels bug fixed
  55. /givebombs
  56. /clearbombs
  57. /setbobms
  58.  
  59.  
  60. =====================================================================================================================================================================
  61. =====================================================================================================================================================================
  62. ====================================================================================================================================================================*/
  63. #define FILTERSCRIPT
  64.  
  65. #include <a_samp>
  66. #include <sscanf2>
  67. #include <ZCMD>
  68.  
  69.  
  70. //Colors*********************
  71. #define Blren 0x058E6AFF
  72. #define Red 0xFF0000FF
  73. #define Green 0x00FF22
  74. //***************************
  75.  
  76. #if defined FILTERSCRIPT
  77.  
  78. public OnFilterScriptInit()
  79. {
  80.     print("\n--------------------------------------");
  81.     print("        EO_Explosives Shop v1.0         ");
  82.     print("--------------------------------------\n");
  83.     return 1;
  84. }
  85.  
  86. public OnFilterScriptExit()
  87. {
  88.     return 1;
  89. }
  90.  
  91. #else
  92.  
  93. main()
  94. {
  95.     print("\n----------------------------------");
  96.     print("   EO_Explosives Shop  by E.Oussama ");
  97.     print("----------------------------------\n");
  98. }
  99.  
  100. #endif
  101.  
  102. new Float:gC[3];
  103.  
  104. new pBomb[MAX_PLAYERS];
  105. new pQBHydraucs[MAX_PLAYERS];
  106. new pQBCore[MAX_PLAYERS];
  107. new pBombTimer[MAX_PLAYERS];
  108. new pABICheck[MAX_PLAYERS];
  109. new pSBCheck[MAX_PLAYERS];
  110. new Float:pBombPos[MAX_PLAYERS][3];
  111. new Float:pABombPos[MAX_PLAYERS][3];
  112. new Float:pQBombPos[MAX_PLAYERS][3];
  113. new pSVBTimer[MAX_PLAYERS];
  114. new pQBombATimer[MAX_PLAYERS];
  115. new Float:pMPos[MAX_PLAYERS][3];
  116. new pMObject[MAX_PLAYERS];
  117. new pAMCheck[MAX_PLAYERS];
  118. new pRCC[MAX_PLAYERS];
  119. new pRCH[MAX_PLAYERS];
  120. new Float:pRCPos[MAX_PLAYERS][3];
  121.  
  122.  
  123.  
  124.  
  125. //DIALOGS
  126. enum{
  127.     DIALOG_EVMINDEX,
  128.     DIALOG_EVMPSTATS,
  129.     DIALOG_EHELP,
  130.     DIALOG_TBomb
  131. };
  132.  
  133. enum E_PLAYER_BOMB_DATA{
  134.     bool:BombUse,
  135.     bool:BombEx,
  136.     bool:BombC4,
  137.     bool:AtBomb,
  138.     bool:CarBomb,
  139.     bool:MBombEx,
  140.     bool:AMBomb,
  141.     bool:pSBomb,
  142.     Bomb,
  143.     SuBomb,
  144.     QBomb,
  145.     EBBomb,
  146.     TBomb,
  147.     MBomb,
  148.     CBomb,
  149.     ABomb,
  150.     SBomb,
  151.     C4,
  152.     RCC,
  153.     RCH
  154. };
  155.  
  156. new pbData[MAX_PLAYERS][E_PLAYER_BOMB_DATA];
  157. new vbData[MAX_VEHICLES][E_PLAYER_BOMB_DATA];
  158.  
  159. //TIMERS
  160. forward BombTimer(playerid);
  161. forward TimingBombTimer(playerid);
  162. forward VehicleCarBombClear(vehicleid);
  163. forward CarBombActivation(vehicleid);
  164. forward atomicbombimpact(playerid);
  165. forward SuVBTimer(playerid);
  166. forward QuantumBombActivation(playerid);
  167.  
  168. stock ClearBombs(playerid){
  169.     pbData[playerid][Bomb] = 0;
  170.     pbData[playerid][RCC] = 0;
  171.     pbData[playerid][RCH] = 0;
  172.     pbData[playerid][SuBomb] = 0;
  173.     pbData[playerid][QBomb] = 0;
  174.     pbData[playerid][EBBomb] = 0;
  175.     pbData[playerid][TBomb] = 0;
  176.     pbData[playerid][MBomb] = 0;
  177.     pbData[playerid][C4] = 0;
  178.     pbData[playerid][CBomb] = 0;
  179.     pbData[playerid][ABomb] = 0;
  180.     pbData[playerid][SBomb] = 0;
  181.     pbData[playerid][RCC] = 0;
  182.     pbData[playerid][RCH] = 0;
  183.     return 1;
  184. }
  185.  
  186. /*=====================================================================================================================================================================
  187. =====================================================================================================================================================================
  188. ======================================================|| Configuration Panel ||=======================================================================================*/
  189. //Bombs Prices
  190. #define BombP 2500      // Normal bomb
  191. #define TBombP 5000     //Settable timed bomb
  192. #define C4P 10000       //C4 remote-controlled
  193. #define CBombP 12000    //Vehicle bomb
  194. #define ABombP 20000    //Atomic Bomb
  195. #define SBombP 9000     //Stiky bomb
  196. #define SuBombP 6000    //Suicidal bomb
  197. #define QBombP 30000    //quantum  bomb
  198. #define MBombP 15000    //Mines
  199. #define EBarrelP 3500   //Explosive barrel
  200. #define ERCCP 15000 //Explosive RC Car
  201. #define ERCHP 20000 //Explosive RC Helicopter
  202. //Timers
  203. #define BrakingTimer 300000 //Timer between using each bomb
  204. #define VehicleBombClearTimer 300000 //Time to clear all vehicle car bombs
  205. /*=====================================================================================================================================================================
  206. ====================================================================================================================================================================*/
  207.  
  208. public OnGameModeInit()
  209. {
  210.     SetGameModeText("EO_Explosives Shop v1.0");
  211.     AddPlayerClass(0, 1173.1952,-1324.2224,15.3951, 269.1425, 0, 0, 0, 0, 0, 0);
  212.  
  213.     SetTimer("VehicleCarBombClear",VehicleBombClearTimer,true);
  214.     return 1;
  215. }
  216.  
  217. public OnGameModeExit()
  218. {
  219.     SetGameModeText("EO_Explosives Shop v1.0");
  220.     AddPlayerClass(0, 1173.1952,-1324.2224,15.3951, 269.1425, 0, 0, 0, 0, 0, 0);
  221.     return 1;
  222. }
  223.  
  224. public OnPlayerRequestClass(playerid, classid)
  225. {
  226.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  227.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  228.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  229.     pbData[playerid][BombEx] = false;
  230.     pbData[playerid][BombC4] = false;
  231.     pbData[playerid][AtBomb] = false;
  232.     pbData[playerid][MBombEx] = false;
  233.     pbData[playerid][pSBomb] = false;
  234.     pbData[playerid][AMBomb] = false;
  235.     return 1;
  236. }
  237.  
  238. public OnPlayerConnect(playerid)
  239. {
  240.     ClearBombs(playerid);
  241.     pbData[playerid][BombEx] = false;
  242.     pbData[playerid][AtBomb] = false;
  243.     pbData[playerid][BombUse] = true;
  244.     pbData[playerid][BombC4] = false;
  245.     pbData[playerid][pSBomb] = false;
  246.     pbData[playerid][MBombEx] = false;
  247.     pbData[playerid][AMBomb] = false;
  248.     return 1;
  249. }
  250.  
  251. public OnPlayerDisconnect(playerid, reason)
  252. {
  253.     pbData[playerid][BombEx] = false;
  254.     pbData[playerid][BombC4] = false;
  255.     pbData[playerid][pSBomb] = false;
  256.     pbData[playerid][AtBomb] = false;
  257.     pbData[playerid][AMBomb] = false;
  258.     pbData[playerid][MBombEx] = false;
  259.     return 1;
  260. }
  261.  
  262. public OnPlayerSpawn(playerid)
  263. {
  264.     pbData[playerid][BombEx] = false;
  265.     pbData[playerid][BombC4] = false;
  266.     pbData[playerid][AtBomb] = false;
  267.     pbData[playerid][pSBomb] = false;
  268.     pbData[playerid][MBombEx] = false;
  269.     TogglePlayerControllable(playerid, true);
  270.     return 1;
  271. }
  272.  
  273. public OnPlayerDeath(playerid, killerid, reason)
  274. {
  275.     if(pbData[playerid][BombEx] == true){
  276.         SendClientMessage(playerid, Red, "[EO_INFO]: {FFFFFF}The Bomb you planted has been deactivated");
  277.     }
  278.     pbData[playerid][BombEx] = false;
  279.     pbData[playerid][BombC4] = false;
  280.     pbData[playerid][AtBomb] = false;
  281.     pbData[playerid][pSBomb] = false;
  282.     pbData[playerid][AMBomb] = false;
  283.     pbData[playerid][MBombEx] = false;
  284.     DestroyObject(pBomb[playerid]);
  285.     return 1;
  286. }
  287.  
  288. public OnVehicleSpawn(vehicleid)
  289. {
  290.     return 1;
  291. }
  292.  
  293. public OnVehicleDeath(vehicleid, killerid)
  294. {
  295.     return 1;
  296. }
  297.  
  298. public OnPlayerText(playerid, text[])
  299. {
  300.     return 1;
  301. }
  302.  
  303. CMD:makeevm(playerid, params[]){
  304.     new Float:x, Float:y, Float:z, Float:r;
  305.     GetPlayerFacingAngle(playerid, r);
  306.     GetPlayerPos(playerid, x, y, z);
  307.     if(IsPlayerAdmin(playerid)){
  308.         if(!IsPlayerInAnyVehicle(playerid)){
  309.             CreateObject(18885, x+1, y, z, 0.0, 0.0, -r);
  310.             SendClientMessage(playerid, 0xFFFF00, "[EO_EVM]: {FFFFFF}Explosives Vending Machine successfully created!");
  311.             return 1;
  312.         }
  313.         else{
  314.             SendClientMessage(playerid, 0xFF0000, "[ERROR]: You can't use this while in a vehicle");
  315.         }
  316.     }
  317.     else{
  318.         SendClientMessage(playerid, 0xFF0000AA, "[ERROR]: You can't use this command");
  319.     }
  320.     return 1;
  321. }
  322.  
  323.  
  324. //explosives stats
  325. CMD:estats(playerid, params[]){
  326.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  327.     new pname[MAX_PLAYER_NAME], str[1050];
  328.     GetPlayerName(playerid, pname, sizeof(pname));
  329.     format(str, sizeof(str), "{CCCCFF}%s{FFFFFF}\n\nBombs: %i\t\tTiming Bombs: %i\nC4: %i\t\t\tCar Bombs: %i\nAtomic Bombs: %i\tSticky Bombs: %i\nBomb Vests: %i\t\tQuantum Bombs: %i\nMines: %i\t\tExplosive Barrels: %i\nExplosive RC Car: %i\tExplosive Drones: %i",
  330.     pname, pbData[playerid][Bomb],pbData[playerid][TBomb],pbData[playerid][C4],pbData[playerid][CBomb],pbData[playerid][ABomb],pbData[playerid][SBomb],pbData[playerid][SuBomb],pbData[playerid][QBomb],pbData[playerid][MBomb],pbData[playerid][EBBomb],pbData[playerid][RCC],pbData[playerid][RCH]);
  331.     ShowPlayerDialog(playerid, DIALOG_EVMPSTATS, DIALOG_STYLE_MSGBOX, "EO_Explosive Stats", str, "Got it!", "");
  332.     return 1;
  333. }
  334.  
  335. //Explosives help index
  336. CMD:ehelp(playerid, params[]){
  337.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  338.     new str[2500];
  339.     strcat(str,"{FFFF00}Bomb: {FFFFFF}A 3 seconds timed bomb with a normal exploding radius, it can be used via /plantbomb\n");
  340.     strcat(str,"{FFFF00}Timing Bomb: {FFFFFF} It's a bomb whose detonation is triggered by a timer which has to be closed in 3 to 60 seconds,\n it can be used via /planttbomb\n");
  341.     strcat(str,"{FFFF00}C4: {FFFFFF}A Remote-controlled bomb, which can be setup somewhere using /plantc4 then detonated via /detonate\n");
  342.     strcat(str,"{FFFF00}Car Bomb: {FFFFFF}A Vehicle related bomb, in order to use it, you be inside of a vehicle, then use /plantvehbomb , after that, you will have to leave the vehicle immediately,\n the bomb will be activated within 3 seconds, and anybody who enters the vehicle by then, will be exploded\n");
  343.     strcat(str,"{FFFF00}Atomic Bomb: {FFFFFF} A bomb that derives its destructive power from the rapid release of nuclear energy, in ordet to use it you have to choose a position, then use /setabpos \nand to activate it, you have to be in a Pony or a Burrito and use /launchab\n");
  344.     strcat(str,"{FFFF00}Sticky Bomb: {FFFFFF} A Sticky Bomb is an explosive charge that when thrown against a player using /attachsbomb sticks until it explodes.\n");
  345.     strcat(str,"{FFFF00}Suicidal bomb vest: {FFFFFF} A Suicidal bomb vest is an armour-like shaped, but instead of protecting you, it activates explosives that will take you and anyone close to you down, to activate it, simply use /mountsvb\n");
  346.     strcat(str,"{FFFF00}Quantum Bomb: {FFFFFF} A Quantum Bomb differs from other bombs with its ability to pull nearby players then teleports them high in the air, next explode them, you can use it via /setqbomb\n");
  347.     strcat(str,"{FFFF00}Mines: {FFFFFF} A mine is an explosive placed underground or underwater that explodes when disturbed, you can use it via /plantmine, then to activate it, use /activatemine\n");
  348.     strcat(str,"{FFFF00}Explosive Barrels: {FFFFFF} An Explosive-loaded steel barrels, that explode upon a physical contact, whether shot or hit, you can place them anywhere using /placeeb\n");
  349.     strcat(str,"{FFFF00}Explosive RC Car: {FFFFFF} A Remote controlled mini-car (basically a moving bomb), it can be used via /activaterccar\n");
  350.     strcat(str,"{FFFF00}Explosive Drone: {FFFFFF} A Remote controlled mini-helicopter (basically a moving bomb), it can be used via /activatedrone\n");
  351.     ShowPlayerDialog(playerid, DIALOG_EHELP, DIALOG_STYLE_MSGBOX, "EO_Explosives Help Section", str, "Got it","");
  352.     return 1;
  353. }
  354.  
  355. CMD:evmcmds(playerid, params[]){
  356.     SendClientMessage(playerid, 0xFFFF0088, "|============EO_Explosive Shop Commands===========|");
  357.     SendClientMessage(playerid, 0xFFFFCC88, "| /evmcmds  ||  /evmshop  ||  /estats  ||  /ehelp |");
  358.     SendClientMessage(playerid, 0xFFFF0088, "|=================================================|");
  359.     return 1;
  360. }
  361.  
  362. CMD:evmshop(playerid, params[]){
  363.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  364.     ShowPlayerDialog(playerid, DIALOG_EVMINDEX, DIALOG_STYLE_LIST, "EO_Explosive Shop",
  365.     "Bomb\n\
  366.     Timing bomb\n\
  367.     C4\n\
  368.     Car bomb\n\
  369.     Atomic bomb\n\
  370.    Sticky bombs\n\
  371.    Suicidal bomb vest\n\
  372.    Quantum bomb\n\
  373.    Mines\n\
  374.    Explosive barrels\n\
  375.     Explosive RC Car\n\
  376.     Explosive Drone"
  377.     ,"Select", "Cancel");
  378.     return 1;
  379. }
  380. ///////////////////////////  ADMIN CMDS  /////////////////////////////////////
  381. CMD:givebombs(playerid, params[]){
  382.     new tid, tname[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], bname[10], amount, str[MAX_PLAYER_NAME+60];
  383.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  384.     if(IsPlayerAdmin(playerid)){
  385.         if(sscanf(params, "us[10]i",tid,bname,amount)) return SendClientMessage(playerid, 0xFFFFFF88, "[USAGE]: /givebombs (playerid) (bomb/tbomb/c4/cbomb/abomb/qbomb/mine/ebarrel/rccar/drone/sbomb/subomb) (amount)");
  386.         GetPlayerName(playerid, pname, sizeof(pname));
  387.         GetPlayerName(tid, tname, sizeof(tname));
  388.         if(IsPlayerConnected(tid)){
  389.             if(!strcmp(bname, "bomb", true)){
  390.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  391.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Bomb(s)",pname,amount);
  392.                 SendClientMessage(tid, Blren, str);
  393.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i bomb(s)",tid,amount);
  394.                 SendClientMessage(playerid, Blren, str);
  395.                 pbData[tid][Bomb] += amount;
  396.             }
  397.             if(!strcmp(bname, "tbomb", true)){
  398.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  399.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Timing Bomb(s)",pname,amount);
  400.                 SendClientMessage(tid, Blren, str);
  401.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Timing bomb(s)",tid,amount);
  402.                 SendClientMessage(playerid, Blren, str);
  403.                 pbData[tid][TBomb] += amount;
  404.             }
  405.             if(!strcmp(bname, "c4", true)){
  406.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  407.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i C4(s)",pname,amount);
  408.                 SendClientMessage(tid, Blren, str);
  409.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i C4(s)",tid,amount);
  410.                 SendClientMessage(playerid, Blren, str);
  411.                 pbData[tid][C4] += amount;
  412.             }
  413.             if(!strcmp(bname, "cbomb", true)){
  414.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  415.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Car Bomb(s)",pname,amount);
  416.                 SendClientMessage(tid, Blren, str);
  417.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Car bomb(s)",tid,amount);
  418.                 SendClientMessage(playerid, Blren, str);
  419.                 pbData[tid][CBomb] += amount;
  420.             }
  421.             if(!strcmp(bname, "abomb", true)){
  422.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  423.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Atomic Bomb(s)",pname,amount);
  424.                 SendClientMessage(tid, Blren, str);
  425.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Atomic bomb(s)",tid,amount);
  426.                 SendClientMessage(playerid, Blren, str);
  427.                 pbData[tid][ABomb] += amount;
  428.             }
  429.             if(!strcmp(bname, "qbomb", true)){
  430.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  431.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Quantum Bomb(s)",pname,amount);
  432.                 SendClientMessage(tid, Blren, str);
  433.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Quantum bomb(s)",tid,amount);
  434.                 SendClientMessage(playerid, Blren, str);
  435.                 pbData[tid][QBomb] += amount;
  436.             }
  437.             if(!strcmp(bname, "mine", true)){
  438.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  439.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Mine(s)",pname,amount);
  440.                 SendClientMessage(tid, Blren, str);
  441.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Mine(s)",tid,amount);
  442.                 SendClientMessage(playerid, Blren, str);
  443.                 pbData[tid][MBomb] += amount;
  444.             }
  445.             if(!strcmp(bname, "ebarrel", true)){
  446.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  447.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Explosive Barrel(s)",pname,amount);
  448.                 SendClientMessage(tid, Blren, str);
  449.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Explosive Barrel(s)",tid,amount);
  450.                 SendClientMessage(playerid, Blren, str);
  451.                 pbData[tid][EBBomb] += amount;
  452.             }
  453.             if(!strcmp(bname, "rccar", true)){
  454.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  455.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Explosive RC Car(s)",pname,amount);
  456.                 SendClientMessage(tid, Blren, str);
  457.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Explosive RC Car(s)",tid,amount);
  458.                 SendClientMessage(playerid, Blren, str);
  459.                 pbData[tid][RCC] += amount;
  460.             }
  461.             if(!strcmp(bname, "drone", true)){
  462.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  463.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Explosive drone(s)",pname,amount);
  464.                 SendClientMessage(tid, Blren, str);
  465.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Explosive drone(s)",tid,amount);
  466.                 SendClientMessage(playerid, Blren, str);
  467.                 pbData[tid][RCH] += amount;
  468.             }
  469.             if(!strcmp(bname, "sbomb", true)){
  470.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  471.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Sticky bomb(s)",pname,amount);
  472.                 SendClientMessage(tid, Blren, str);
  473.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Sticky bomb(s)",tid,amount);
  474.                 SendClientMessage(playerid, Blren, str);
  475.                 pbData[tid][SBomb] += amount;
  476.             }
  477.             if(!strcmp(bname, "subomb", true)){
  478.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  479.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Suicidal Vest(s)",pname,amount);
  480.                 SendClientMessage(tid, Blren, str);
  481.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Suicidal Vest(s)",tid,amount);
  482.                 SendClientMessage(playerid, Blren, str);
  483.                 pbData[tid][SuBomb] += amount;
  484.             }
  485.         }
  486.         else{
  487.             SendClientMessage(playerid, 0xFF000088, "[ERROR]: That player isn't connected");
  488.         }
  489.     }
  490.     else{
  491.         SendClientMessage(playerid,0xFF000088,"[ERROR]: You are not authorized to use that");
  492.     }
  493.     return 1;
  494. }
  495.  
  496.  
  497. CMD:setbombs(playerid, params[]){
  498.     new tid, tname[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], bname[10], amount, str[MAX_PLAYER_NAME+60];
  499.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  500.     if(IsPlayerAdmin(playerid)){
  501.         if(sscanf(params, "us[10]i",tid,bname,amount)) return SendClientMessage(playerid, 0xFFFFFF, "[USAGE]: /setbombs (playerid) (bomb/tbomb/c4/cbomb/abomb/qbomb/mine/ebarrel/rccar/drone/sbomb/subomb) (amount)");
  502.         GetPlayerName(playerid, pname, sizeof(pname));
  503.         GetPlayerName(tid, tname, sizeof(tname));
  504.         if(IsPlayerConnected(tid)){
  505.             if(!strcmp(bname, "bomb", true)){
  506.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  507.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your bombs to %i",pname,amount);
  508.                 SendClientMessage(tid, Blren, str);
  509.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's bombs to %i",tid,amount);
  510.                 SendClientMessage(playerid, Blren, str);
  511.                 pbData[tid][Bomb] = amount;
  512.             }
  513.             if(!strcmp(bname, "tbomb", true)){
  514.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  515.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Timing bombs to %i",pname,amount);
  516.                 SendClientMessage(tid, Blren, str);
  517.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Timing bombs to %i",tid,amount);
  518.                 SendClientMessage(playerid, Blren, str);
  519.                 pbData[tid][TBomb] = amount;
  520.             }
  521.             if(!strcmp(bname, "c4", true)){
  522.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  523.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your C4s to %i",pname,amount);
  524.                 SendClientMessage(tid, Blren, str);
  525.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's C4s to %i",tid,amount);
  526.                 SendClientMessage(playerid, Blren, str);
  527.                 pbData[tid][C4] = amount;
  528.             }
  529.             if(!strcmp(bname, "cbomb", true)){
  530.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  531.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Car bombs to %i",pname,amount);
  532.                 SendClientMessage(tid, Blren, str);
  533.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Car bombs to %i",tid,amount);
  534.                 SendClientMessage(playerid, Blren, str);
  535.                 pbData[tid][CBomb] = amount;
  536.             }
  537.             if(!strcmp(bname, "abomb", true)){
  538.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  539.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Atomic bombs to %i",tid,amount);
  540.                 SendClientMessage(tid, Blren, str);
  541.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Atomic bomb(s)",tid,amount);
  542.                 SendClientMessage(playerid, Blren, str);
  543.                 pbData[tid][ABomb] = amount;
  544.             }
  545.             if(!strcmp(bname, "qbomb", true)){
  546.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  547.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Quantum bombs to %i",pname,amount);
  548.                 SendClientMessage(tid, Blren, str);
  549.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Quantum bombs to %i",tid,amount);
  550.                 SendClientMessage(playerid, Blren, str);
  551.                 pbData[tid][QBomb] = amount;
  552.             }
  553.             if(!strcmp(bname, "mine", true)){
  554.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  555.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Mines to %i",pname,amount);
  556.                 SendClientMessage(tid, Blren, str);
  557.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Mines to %i",tid,amount);
  558.                 SendClientMessage(playerid, Blren, str);
  559.                 pbData[tid][MBomb] = amount;
  560.             }
  561.             if(!strcmp(bname, "ebarrel", true)){
  562.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  563.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Explosive barrels to %i",pname,amount);
  564.                 SendClientMessage(tid, Blren, str);
  565.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Explosive barrels to %i",tid,amount);
  566.                 SendClientMessage(playerid, Blren, str);
  567.                 pbData[tid][EBBomb] = amount;
  568.             }
  569.             if(!strcmp(bname, "rccar", true)){
  570.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  571.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Explosive RC Cars to %i",pname,amount);
  572.                 SendClientMessage(tid, Blren, str);
  573.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Explosive RC Cars to %i",tid,amount);
  574.                 SendClientMessage(playerid, Blren, str);
  575.                 pbData[tid][RCC] = amount;
  576.             }
  577.             if(!strcmp(bname, "drone", true)){
  578.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  579.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Explosive Drones to %i",pname,amount);
  580.                 SendClientMessage(tid, Blren, str);
  581.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Explosive Drones to %i",tid,amount);
  582.                 SendClientMessage(playerid, Blren, str);
  583.                 pbData[tid][RCH] = amount;
  584.             }
  585.             if(!strcmp(bname, "sbomb", true)){
  586.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  587.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Sticky bombs to %i",pname,amount);
  588.                 SendClientMessage(tid, Blren, str);
  589.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Sticky bombs to %i",tid,amount);
  590.                 SendClientMessage(playerid, Blren, str);
  591.                 pbData[tid][SBomb] = amount;
  592.             }
  593.             if(!strcmp(bname, "subomb", true)){
  594.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  595.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Suicidal Vests to %i",pname,amount);
  596.                 SendClientMessage(tid, Blren, str);
  597.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Suicidal Vests to %i",tid,amount);
  598.                 SendClientMessage(playerid, Blren, str);
  599.                 pbData[tid][SuBomb] = amount;
  600.             }
  601.         }
  602.         else{
  603.             SendClientMessage(playerid, 0xFF000088, "[ERROR]: That player isn't connected");
  604.         }
  605.     }
  606.     else{
  607.         SendClientMessage(playerid,0xFF000088,"[ERROR]: You are not authorized to use that");
  608.     }
  609.     return 1;
  610. }
  611.  
  612.  
  613. CMD:clearbombs(playerid, params[]){
  614.     new tid, tname[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], str[MAX_PLAYER_NAME+35];
  615.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  616.     if(IsPlayerAdmin(playerid)){
  617.         if(sscanf(params, "us[10]i",tid)) return SendClientMessage(playerid, 0xFFFFFF, "[USAGE]: /clearbombs (playerid)");
  618.         GetPlayerName(playerid, pname, sizeof(pname));
  619.         GetPlayerName(tid, tname, sizeof(tname));
  620.         if(IsPlayerConnected(tid)){
  621.             ClearBombs(tid);
  622.             format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s has cleared your bombs",pname);
  623.             SendClientMessage(tid, Blren, str);
  624.             format(str, sizeof(str),"[INFO]:{FFFFFF}Your bombs have been cleared",tid);
  625.             SendClientMessage(playerid, Blren, str);
  626.         }
  627.     }
  628.     return 1;
  629. }
  630. //////////////////////////   BOMBS    ////////////////////////////////////////
  631.  
  632. //Bomb
  633. CMD:plantbomb(playerid, params[]){
  634.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  635.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  636.     if(pbData[playerid][Bomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a bomb");
  637.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  638.     GetPlayerPos(playerid, gC[0], gC[1], gC[2]);
  639.     pBomb[playerid] = CreateObject(1252, gC[0], gC[1], gC[2], 0.0, 0.0,0.0);
  640.     pBombPos[playerid][0] = gC[0];
  641.     pBombPos[playerid][1] = gC[1];
  642.     pBombPos[playerid][2] = gC[2];
  643.     pBombTimer[playerid] = SetTimerEx("BombTimer", 3000, false, "i", playerid);
  644.     pbData[playerid][BombUse] = false;
  645.     pbData[playerid][Bomb]--;
  646.     pbData[playerid][BombEx] = true;
  647.     return 1;
  648. }
  649. //Timming Bomb
  650. CMD:planttbomb(playerid, params[]){
  651.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  652.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  653.     if(pbData[playerid][TBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a timing bomb");
  654.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  655.     ShowPlayerDialog(playerid, DIALOG_TBomb, DIALOG_STYLE_INPUT, "Timing Bomb","Setup the seconds of the bomb to explode", "Setup", "Cancel");
  656.     return 1;
  657. }
  658. //C4
  659. CMD:plantc4(playerid, params[]){
  660.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  661.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  662.     if(pbData[playerid][C4] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a C4");
  663.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  664.     GetPlayerPos(playerid, gC[0], gC[1], gC[2]);
  665.     pBomb[playerid] = CreateObject(1252, gC[0], gC[1], gC[2]-1, 0.0, 0.0,0.0);
  666.     pBombPos[playerid][0] = gC[0];
  667.     pBombPos[playerid][1] = gC[1];
  668.     pBombPos[playerid][2] = gC[2];
  669.     pbData[playerid][BombUse] = false;
  670.     pbData[playerid][C4]--;
  671.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}You can use {FFFF00}/detonate {FFFFFF}to activate the C4");
  672.     pbData[playerid][BombEx] = true;
  673.     pbData[playerid][BombC4] = true;
  674.     return 1;
  675. }
  676. CMD:detonate(playerid, params[]){
  677.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  678.     if(pbData[playerid][BombC4] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: There is no C4 to blowup");
  679.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}You have detonated the C4");
  680.     CreateExplosion(pBombPos[playerid][0],pBombPos[playerid][1], pBombPos[playerid][2], 1, 5);
  681.     pbData[playerid][BombUse] = false;
  682.     SetTimerEx("BombBrakeTimer", BrakingTimer, false, "i", playerid);
  683.     DestroyObject(pBomb[playerid]);
  684.     pbData[playerid][BombC4] = false;
  685.     pbData[playerid][BombEx] = false;
  686.     return 1;
  687. }
  688. //Car bomb
  689. CMD:plantvehbomb(playerid, params[]){
  690.     new vehicleid = GetPlayerVehicleID(playerid);
  691.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  692.     if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You have to be in a vehicle to use this!");
  693.     if(pbData[playerid][CBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Car bomb");
  694.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  695.     vbData[vehicleid][CarBomb] = true;
  696.     SendClientMessage(playerid, Blren, "[EO_INFO]: You have planted a car bomb in this vehicle");
  697.     SendClientMessage(playerid, Blren, "[EO_INFO]: The car bomb will be activated if anyone attempts to drive it");
  698.     pbData[playerid][BombEx] = true;
  699.     pbData[playerid][BombUse] = false;
  700.     return 1;
  701. }
  702. //Atomic bomb
  703. CMD:setabpos(playerid, params[]){
  704.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  705.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  706.     if(pbData[playerid][ABomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have an Atomic bomb");
  707.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  708.     GetPlayerPos(playerid, gC[0], gC[1], gC[2]);
  709.     pABombPos[playerid][0] = gC[0];
  710.     pABombPos[playerid][1] = gC[1];
  711.     pABombPos[playerid][2] = gC[2]+100;
  712.     pbData[playerid][BombUse] = false;
  713.     pbData[playerid][ABomb]--;
  714.     pbData[playerid][BombEx] = true;
  715.     pbData[playerid][AtBomb] = true;
  716.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}The atomic bomb impact position has been set!");
  717.     return 1;
  718. }
  719. CMD:launchab(playerid,params[]){
  720.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  721.     if(pbData[playerid][AtBomb] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: There is no posetion set to activate the atomic bomb");
  722.     if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 413 || GetVehicleModel(GetPlayerVehicleID(playerid)) != 482) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You have to be in a Pony or a Burrito to launch the Atomic Bomb");
  723.     pBomb[playerid] = CreateObject(3786, pABombPos[playerid][0], pABombPos[playerid][1], pABombPos[playerid][2], 0.0,-90,0.0);
  724.     MoveObject(pBomb[playerid],pABombPos[playerid][0], pABombPos[playerid][1], pABombPos[playerid][2]-100,30,0.0,-90,0.0);
  725.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}The atomic bomb has been launched");
  726.     pABICheck[playerid] = SetTimer("atomicbombimpact", 100, true);
  727.     return 1;
  728. }
  729. public atomicbombimpact(playerid){
  730.     new Float:ax,Float:ay,Float:az;
  731.     GetObjectPos(pBomb[playerid],ax, ay, az);
  732.     if(ax == pABombPos[playerid][0] && ay == pABombPos[playerid][1] && az == pABombPos[playerid][2]-100){
  733.         CreateExplosion(pABombPos[playerid][0]+10,pABombPos[playerid][1]+5, pABombPos[playerid][2]-100, 2, 500);
  734.         CreateExplosion(pABombPos[playerid][0]+3,pABombPos[playerid][1]+2, pABombPos[playerid][2]-100, 3, 200);
  735.         CreateExplosion(pABombPos[playerid][0]-10,pABombPos[playerid][1], pABombPos[playerid][2]-100, 4, 400);
  736.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]+8, pABombPos[playerid][2]-100, 1, 300);
  737.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1], pABombPos[playerid][2]-100, 2, 20);
  738.         CreateExplosion(pABombPos[playerid][0]+12,pABombPos[playerid][1]+4, pABombPos[playerid][2]-100, 2, 20);
  739.         CreateExplosion(pABombPos[playerid][0]+10,pABombPos[playerid][1]-6, pABombPos[playerid][2]-100, 2, 20);
  740.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1], pABombPos[playerid][2]-100, 13, 20);
  741.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]+2, pABombPos[playerid][2]-100, 6, 20);
  742.        
  743.         CreateExplosion(pABombPos[playerid][0]-10,pABombPos[playerid][1]-5, pABombPos[playerid][2]-100, 2, 100);
  744.         CreateExplosion(pABombPos[playerid][0]-3,pABombPos[playerid][1]-2, pABombPos[playerid][2]-100, 3, 100);
  745.         CreateExplosion(pABombPos[playerid][0]+10,pABombPos[playerid][1], pABombPos[playerid][2]-100, 4, 100);
  746.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]-8, pABombPos[playerid][2]-100, 1, 100);
  747.         CreateExplosion(pABombPos[playerid][0]+20,pABombPos[playerid][1], pABombPos[playerid][2]-100, 2, 100);
  748.         CreateExplosion(pABombPos[playerid][0]-12,pABombPos[playerid][1]-4, pABombPos[playerid][2]-100, 2, 100);
  749.         CreateExplosion(pABombPos[playerid][0]-10,pABombPos[playerid][1]+6, pABombPos[playerid][2]-100, 2, 100);
  750.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]-2, pABombPos[playerid][2]-100, 7, 100);
  751.        
  752.         CreateExplosion(pABombPos[playerid][0]-15,pABombPos[playerid][1]-15, pABombPos[playerid][2]-100, 2, 20);
  753.         CreateExplosion(pABombPos[playerid][0]-13,pABombPos[playerid][1]-20, pABombPos[playerid][2]-100, 3, 20);
  754.         CreateExplosion(pABombPos[playerid][0]+15,pABombPos[playerid][1], pABombPos[playerid][2]-100, 4, 20);
  755.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]-18, pABombPos[playerid][2]-100, 1, 20);
  756.         CreateExplosion(pABombPos[playerid][0]+18,pABombPos[playerid][1], pABombPos[playerid][2]-100, 2, 20);
  757.         CreateExplosion(pABombPos[playerid][0]-22,pABombPos[playerid][1]-24, pABombPos[playerid][2]-100, 2, 20);
  758.         CreateExplosion(pABombPos[playerid][0]-20,pABombPos[playerid][1]+16, pABombPos[playerid][2]-100, 2, 20);
  759.        
  760.         CreateExplosion(pABombPos[playerid][0]+30,pABombPos[playerid][1]+30, pABombPos[playerid][2]-100, 6, 100);
  761.         CreateExplosion(pABombPos[playerid][0]-30,pABombPos[playerid][1]+30, pABombPos[playerid][2]-100, 6, 100);
  762.         CreateExplosion(pABombPos[playerid][0]+30,pABombPos[playerid][1]+0, pABombPos[playerid][2]-100, 6, 100);
  763.         CreateExplosion(pABombPos[playerid][0]-30,pABombPos[playerid][1]+10, pABombPos[playerid][2]-100, 6, 100);
  764.         CreateExplosion(pABombPos[playerid][0]-30,pABombPos[playerid][1]-30, pABombPos[playerid][2]-100, 6, 100);
  765.         CreateExplosion(pABombPos[playerid][0]+20,pABombPos[playerid][1]-30, pABombPos[playerid][2]-100, 6, 100);
  766.        
  767.         DestroyObject(pBomb[playerid]);
  768.         for(new i=0;i<=MAX_PLAYERS;i++){
  769.             if(!IsPlayerConnected(i)) continue;
  770.             if(IsPlayerInRangeOfPoint(i,100,pABombPos[playerid][0],pABombPos[playerid][1], pABombPos[playerid][2]-100)){
  771.                 SetPlayerDrunkLevel (playerid, 5000);
  772.                 SetPlayerArmour(i,0);
  773.                 SetPlayerHealth(i,0);
  774.             }
  775.         }
  776.     }
  777.     pbData[playerid][BombUse] = false;
  778.     pbData[playerid][BombEx] = false;
  779.     pbData[playerid][AtBomb] = false;
  780. }
  781.  
  782. //Sticky Bomb
  783. CMD:attachsbomb(playerid, params[]){
  784.     new tid, str[40+MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], tname[MAX_PLAYER_NAME];
  785.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  786.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  787.     if(pbData[playerid][SBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Sticky bomb");
  788.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  789.     if(sscanf(params, "u", tid)) return SendClientMessage(playerid, 0xFFFFFF, "[USAGE]: /attachsbomb (playerid)");
  790.     if(!IsPlayerConnected(tid) || tid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: This player is not connected");
  791.     if(tid == playerid) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You can't stick a bomb to yourself");
  792.     if(IsPlayerInAnyVehicle(tid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: That player is in a vehicle");
  793.     GetPlayerName(playerid, pname, sizeof(pname));
  794.     GetPlayerName(tid, tname, sizeof(tname));
  795.     pbData[tid][pSBomb] = true;
  796.     pSBCheck[playerid] = SetTimer("stickybombexp", 3000, false);
  797.     pbData[playerid][BombUse] = false;
  798.     pbData[playerid][SBomb]--;
  799.     pbData[playerid][BombEx] = true;
  800.     format(str, sizeof(str), "[EO_INFO]: {FFFFFF}%s Has thrown a sticky bomb on you",pname);
  801.     SendClientMessage(tid, Blren, str);
  802.     format(str, sizeof(str), "[EO_INFO]: {FFFFFF}You have sticked a sticky bomb to %s",tname);
  803.     SendClientMessage(playerid, Blren, str);
  804.     return 1;
  805. }
  806.  
  807. forward stickybombexp(playerid);
  808. public stickybombexp(playerid){
  809.     new Float:sx, Float:sy, Float:sz;
  810.     GetPlayerPos(playerid, sx, sy, sz);
  811.     SetPlayerArmour(playerid,0);
  812.     SetPlayerHealth(playerid, 0);
  813.     CreateExplosion(sx, sy, sz, 2, 10);
  814.     pbData[playerid][BombEx] = false;
  815.     pbData[playerid][BombUse] = false;
  816. }
  817.  
  818. //Suicidal vest
  819. CMD:mountsvb(playerid, params[]){
  820.    
  821.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  822.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  823.     if(pbData[playerid][SuBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Suicidal bomb vest");
  824.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  825.     SetPlayerAttachedObject(playerid, 1, 19515, 1, 0, 0.0, 0.0, 0, 0, 0, 1, 1, 1, 0xFF00FF00);
  826.     pSVBTimer[playerid] = SetTimer("SuVBTimer", 3000, false);
  827.     pbData[playerid][SuBomb]--;
  828.     pbData[playerid][BombEx] = true;
  829.     pbData[playerid][BombUse] = false;
  830.     return 1;
  831. }
  832. public SuVBTimer(playerid){
  833.     new Float:svbx, Float:svby, Float:svbz;
  834.     GetPlayerPos(playerid, svbx, svby, svbz);
  835.     SetPlayerArmour(playerid, 0);
  836.     SetPlayerHealth(playerid, 0);
  837.     CreateExplosion(svbx,svby, svbz, 2, 20);
  838.     RemovePlayerAttachedObject(playerid, 1);
  839.     pbData[playerid][BombEx] = false;
  840.     pbData[playerid][BombUse] = false;
  841. }
  842. //Quantum bomb
  843. CMD:setqbomb(playerid, params[]){
  844.     new Float:pqx, Float:pqy, Float:pqz;
  845.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  846.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  847.     if(pbData[playerid][QBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Quantum bomb");
  848.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  849.     GetPlayerPos(playerid, pqx, pqy, pqz);
  850.     pQBCore[playerid] = CreateObject(919 ,pqx, pqy, pqz-0.5, 0.0,0.0,0.0,100);
  851.     pQBHydraucs[playerid] = CreateObject(930, pqx+0.8, pqy, pqz-0.5, 0.0,0.0,90.0,100);
  852.     pQBombPos[playerid][0] = pqx;
  853.     pQBombPos[playerid][1] = pqy;
  854.     pQBombPos[playerid][2] = pqz;
  855.     pQBombATimer[playerid] = SetTimer("QuantumBombActivation", 5000, false);
  856.     pbData[playerid][QBomb]--;
  857.     pbData[playerid][BombUse] = false;
  858.     pbData[playerid][BombEx] = true;
  859.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}The Quantum bomb has been activated, the effect will start in 3 seconds");
  860.     return 1;
  861. }
  862. public QuantumBombActivation(playerid){
  863.  
  864.     for(new i=0;i<=MAX_PLAYERS;i++){
  865.         if(IsPlayerInRangeOfPoint(i,40, pQBombPos[playerid][0], pQBombPos[playerid][1], pQBombPos[playerid][2])){
  866.             TogglePlayerControllable(i, false);
  867.             SetPlayerPos(i, pQBombPos[playerid][0], pQBombPos[playerid][1], pQBombPos[playerid][2]);
  868.             SetPlayerArmour(i, 0);
  869.             SetPlayerHealth(i, 50);
  870.             SendClientMessage(i, Blren, "[EO_INFO]: {FFFFFF}You have been pulled to the Quantum explosion core");
  871.         }
  872.     }
  873.     CreateExplosion(pQBombPos[playerid][0],pQBombPos[playerid][1], pQBombPos[playerid][2], 2, 50);
  874.     DestroyObject(pQBCore[playerid]);
  875.     DestroyObject(pQBHydraucs[playerid]);
  876.     pbData[playerid][BombUse] = false;
  877.     pbData[playerid][BombEx] = false;
  878.     for(new i=0;i<=MAX_PLAYERS;i++){
  879.         if(IsPlayerInRangeOfPoint(i,40, pQBombPos[playerid][0], pQBombPos[playerid][1], pQBombPos[playerid][2])){
  880.             TogglePlayerControllable(i, true);
  881.             SetPlayerPos(i, pQBombPos[playerid][0]-70, pQBombPos[playerid][1]+60, pQBombPos[playerid][2]+350);
  882.             CreateExplosion(pQBombPos[playerid][0]-70,pQBombPos[playerid][1]+60, pQBombPos[playerid][2]+350, 2, 50);
  883.         }
  884.     }
  885. }
  886.  
  887. //Mines
  888. CMD:plantmine(playerid, params[]){
  889.     new Float:pmx, Float:pmy, Float:pmz;
  890.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  891.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  892.     if(pbData[playerid][MBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Mine");
  893.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  894.     GetPlayerPos(playerid, pmx, pmy, pmz);
  895.     pMPos[playerid][0] = pmx;
  896.     pMPos[playerid][1] = pmy;
  897.     pMPos[playerid][2] = pmz;
  898.     pMObject[playerid] = CreateObject(2992,pMPos[playerid][0], pMPos[playerid][1], pMPos[playerid][2]-0.85, 0.0, 0.0, 0.0, 3);
  899.     pAMCheck[playerid] = SetTimer("MineCheck", 50, true);
  900.     pbData[playerid][MBomb]--;
  901.     pbData[playerid][BombUse] = false;
  902.     pbData[playerid][BombEx] = true;
  903.     pbData[playerid][MBombEx] = true;
  904.     pbData[playerid][AMBomb] = false;
  905.     return 1;
  906. }
  907. CMD:activatemine(playerid,params[]){
  908.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  909.     if(pbData[playerid][MBombEx] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: There is no Mine to activate");
  910.     if(pbData[playerid][AMBomb] == true) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Your Mine bomb is already activated");
  911.     pbData[playerid][AMBomb] = true;
  912.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}You have activated your Mine");
  913.     return 1;
  914. }
  915. forward MineCheck(playerid);
  916. public MineCheck(playerid){
  917.     if(pbData[playerid][BombEx] == true && pbData[playerid][MBombEx] == true)
  918.     {
  919.         if(pbData[playerid][AMBomb] == true)
  920.         {
  921.             for(new i=0; i<=MAX_PLAYERS; i++)
  922.             {
  923.                 if(IsPlayerInRangeOfPoint(i,2,pMPos[playerid][0],pMPos[playerid][1],pMPos[playerid][2]))
  924.                 {
  925.                     if(!IsPlayerConnected(i)) continue;
  926.                     SetPlayerArmour(i, 0);
  927.                     SetPlayerArmour(i,10);
  928.                     CreateExplosion(pMPos[playerid][0],pMPos[playerid][1], pMPos[playerid][2], 2, 30);
  929.                     DestroyObject(pMObject[playerid]);
  930.                     pbData[playerid][BombUse] = false;
  931.                     pbData[playerid][BombEx] = false;
  932.                     pbData[playerid][MBombEx] = false;
  933.                     pbData[playerid][AMBomb] = false;
  934.                 }
  935.             }
  936.         }
  937.     }
  938. }
  939. //Barrel
  940. CMD:placeeb(playerid, params[]){
  941.     new Float:ebx, Float:eby, Float:ebz;
  942.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  943.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  944.     if(pbData[playerid][EBBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have any Explosive Barrels left");
  945.     GetPlayerPos(playerid, ebx, eby, ebz);
  946.     CreateObject(1225, ebx+0.5, eby, ebz, 0.0, 0.0, 0.0);
  947.     pbData[playerid][EBBomb]--;
  948.     pbData[playerid][BombUse] = false;
  949.     pbData[playerid][BombEx] = false;
  950.     return 1;
  951. }
  952. //RC CAR
  953. new pRCCTimer[MAX_PLAYERS];
  954. new pRCHTimer[MAX_PLAYERS];
  955. CMD:activaterccar(playerid, params[]){
  956.     new Float:rccx, Float:rccy, Float:rccz,Float:opx,Float:opy,Float:opz;
  957.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  958.     if(pbData[playerid][RCC] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have an Explosive RC Car");
  959.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  960.     if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 413) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You have to be in a pony");
  961.     GetPlayerPos(playerid, rccx, rccy, rccz);
  962.     GetPlayerPos(playerid, opx, opy, opz);
  963.     pRCPos[playerid][0] = opx;
  964.     pRCPos[playerid][1] = opy;
  965.     pRCPos[playerid][2] = opz;
  966.     pRCC[playerid] = CreateVehicle(441, rccx+2, rccy-1, rccz-0.5, 0.0, 1,2,10000,0);
  967.     PutPlayerInVehicle(playerid, pRCC[playerid],0);
  968.     pRCCTimer[playerid] = SetTimer("RCCEXP",5000,false);
  969.     pbData[playerid][RCC]--;
  970.     pbData[playerid][BombUse] = false;
  971.     pbData[playerid][BombEx] = true;
  972.     return 1;
  973. }
  974. forward RCCEXP(playerid);
  975. public RCCEXP(playerid){
  976.     new Float:rccx, Float:rccy, Float:rccz;
  977.     GetVehiclePos(pRCC[playerid], rccx, rccy, rccz);
  978.     RemovePlayerFromVehicle(playerid);
  979.     SetPlayerPos(playerid, pRCPos[playerid][0],pRCPos[playerid][1],pRCPos[playerid][2]);
  980.     CreateExplosion(rccx,rccy, rccz, 2, 20);
  981.     pbData[playerid][BombEx] = false;
  982.     pbData[playerid][BombUse] = false;
  983. }
  984. //RC Heli
  985. CMD:activatedrone(playerid, params[]){
  986.     new Float:rccx, Float:rccy, Float:rccz,Float:opx,Float:opy,Float:opz;
  987.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  988.     if(pbData[playerid][RCH] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have an Explosive Drone");
  989.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  990.     if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 413) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You have to be in a pony");
  991.     GetPlayerPos(playerid, rccx, rccy, rccz);
  992.     GetPlayerPos(playerid, opx, opy, opz);
  993.     pRCPos[playerid][0] = opx;
  994.     pRCPos[playerid][1] = opy;
  995.     pRCPos[playerid][2] = opz;
  996.     pRCH[playerid] = CreateVehicle(465, rccx+2, rccy-1, rccz-0.5, 0.0, 1,2,10000,0);
  997.     PutPlayerInVehicle(playerid, pRCH[playerid],0);
  998.     pRCHTimer[playerid] = SetTimer("RCCEXP",5000,false);
  999.     pbData[playerid][RCH]--;
  1000.     pbData[playerid][BombEx] = true;
  1001.     pbData[playerid][BombUse] = false;
  1002.     return 1;
  1003. }
  1004.  
  1005. forward RCHEXP(playerid);
  1006. public RCHEXP(playerid){
  1007.     new Float:drx, Float:dry, Float:drz;
  1008.     GetVehiclePos(pRCH[playerid], drx, dry, drz);
  1009.     RemovePlayerFromVehicle(playerid);
  1010.     SetPlayerPos(playerid, pRCPos[playerid][0],pRCPos[playerid][1],pRCPos[playerid][2]);
  1011.     CreateExplosion(drx,dry,drz, 2, 20);
  1012.     pbData[playerid][BombEx] = false;
  1013.     pbData[playerid][BombUse] = false;
  1014.  
  1015. }
  1016. ////////////////////////////////  TIMERS   //////////////////////////////////////
  1017.  
  1018. //Time to explode
  1019. public BombTimer(playerid){
  1020.     KillTimer(pBombTimer[playerid]);
  1021.     CreateExplosion(pBombPos[playerid][0],pBombPos[playerid][1], pBombPos[playerid][2], 1, 5);
  1022.     pbData[playerid][BombUse] = false;
  1023.     SetTimerEx("BombBrakeTimer", BrakingTimer, false, "i", playerid);
  1024.     DestroyObject(pBomb[playerid]);
  1025.     pbData[playerid][BombEx] = false;
  1026. }
  1027. //Timed bomb exploding timer
  1028. public TimingBombTimer(playerid){
  1029.     if(pbData[playerid][BombEx] == true){
  1030.         KillTimer(pBombTimer[playerid]);
  1031.         CreateExplosion(pBombPos[playerid][0],pBombPos[playerid][1], pBombPos[playerid][2], 1, 5);
  1032.         pbData[playerid][BombEx] = false;
  1033.         DestroyObject(pBomb[playerid]);
  1034.     }
  1035. }
  1036. //Car bomb clearing
  1037. public VehicleCarBombClear(vehicleid){
  1038.     new str[250],Count=0;
  1039.     for(new i=0; i<=MAX_VEHICLES;i++){
  1040.         if(vbData[i][CarBomb] == true) return Count++;
  1041.         vbData[i][CarBomb] = false;
  1042.     }
  1043.     format(str,sizeof(str), "[EO_INFO]: {FFFFFF}All vehicle bombs were cleared, {FFFF00}(total: %i)",Count);
  1044.     SendClientMessageToAll(Blren, str);
  1045.     return 1;
  1046. }
  1047. /////////////////////////// Brake Timer    ///////////////////////////////////
  1048. forward BombBrakeTimer(playerid);
  1049. public BombBrakeTimer(playerid){
  1050.     pbData[playerid][BombUse] = true;
  1051. }
  1052.  
  1053.  
  1054. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1055. {
  1056.     new Float:x, Float:y, Float:z;
  1057.     if(vbData[vehicleid][CarBomb] == true){
  1058.         GetVehiclePos(vehicleid, x, y, z);
  1059.         SetVehicleHealth(vehicleid, 0);
  1060.         CreateExplosion(x,y, z, 2, 10);
  1061.         pbData[playerid][BombEx] = false;
  1062.         vbData[vehicleid][BombUse] = false;
  1063.         vbData[vehicleid][CarBomb] = false;
  1064.     }
  1065.     return 1;
  1066. }
  1067.  
  1068. public OnPlayerExitVehicle(playerid, vehicleid)
  1069. {
  1070.     return 1;
  1071. }
  1072.  
  1073. public OnPlayerStateChange(playerid, newstate, oldstate)
  1074. {
  1075.     return 1;
  1076. }
  1077.  
  1078. public OnPlayerEnterCheckpoint(playerid)
  1079. {
  1080.     return 1;
  1081. }
  1082.  
  1083. public OnPlayerLeaveCheckpoint(playerid)
  1084. {
  1085.     return 1;
  1086. }
  1087.  
  1088. public OnPlayerEnterRaceCheckpoint(playerid)
  1089. {
  1090.     return 1;
  1091. }
  1092.  
  1093. public OnPlayerLeaveRaceCheckpoint(playerid)
  1094. {
  1095.     return 1;
  1096. }
  1097.  
  1098. public OnRconCommand(cmd[])
  1099. {
  1100.     return 1;
  1101. }
  1102.  
  1103. public OnPlayerRequestSpawn(playerid)
  1104. {
  1105.     return 1;
  1106. }
  1107.  
  1108. public OnObjectMoved(objectid)
  1109. {
  1110.     return 1;
  1111. }
  1112.  
  1113. public OnPlayerObjectMoved(playerid, objectid)
  1114. {
  1115.     return 1;
  1116. }
  1117.  
  1118. public OnPlayerPickUpPickup(playerid, pickupid)
  1119. {
  1120.     return 1;
  1121. }
  1122.  
  1123. public OnVehicleMod(playerid, vehicleid, componentid)
  1124. {
  1125.     return 1;
  1126. }
  1127.  
  1128. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  1129. {
  1130.     return 1;
  1131. }
  1132.  
  1133. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  1134. {
  1135.     return 1;
  1136. }
  1137.  
  1138. public OnPlayerSelectedMenuRow(playerid, row)
  1139. {
  1140.     return 1;
  1141. }
  1142.  
  1143. public OnPlayerExitedMenu(playerid)
  1144. {
  1145.     return 1;
  1146. }
  1147.  
  1148. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  1149. {
  1150.     return 1;
  1151. }
  1152.  
  1153. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1154. {
  1155.     return 1;
  1156. }
  1157.  
  1158. public OnRconLoginAttempt(ip[], password[], success)
  1159. {
  1160.     return 1;
  1161. }
  1162.  
  1163. public OnPlayerUpdate(playerid)
  1164. {
  1165.     return 1;
  1166. }
  1167.  
  1168. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1169. {
  1170.     if(dialogid == DIALOG_EVMINDEX){
  1171.         switch(listitem){
  1172.             case 0:{
  1173.                 if(GetPlayerMoney(playerid) >= BombP){
  1174.                     new string[120];
  1175.                     pbData[playerid][Bomb]++;
  1176.                     GivePlayerMoney(playerid, -TBombP);
  1177.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Bomb for $%i, the use instructions via /ehelp",BombP);
  1178.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1179.                 }
  1180.                 else
  1181.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1182.             }
  1183.             case 1:{
  1184.                 if(GetPlayerMoney(playerid) >= TBombP){
  1185.                     new string[120];
  1186.                     pbData[playerid][TBomb]++;
  1187.                     GivePlayerMoney(playerid, -TBombP);
  1188.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Timing Bomb for $%i, the use instructions via /ehelp",TBombP);
  1189.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1190.                 }
  1191.                 else
  1192.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1193.             }
  1194.             case 2:{
  1195.                 if(GetPlayerMoney(playerid) >= C4P){
  1196.                     new string[120];
  1197.                     pbData[playerid][C4]++;
  1198.                     GivePlayerMoney(playerid, -C4P);
  1199.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a C4 for $%i, the use instructions via /ehelp",C4P);
  1200.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1201.                 }
  1202.                 else
  1203.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1204.             }
  1205.             case 3:{
  1206.                 if(GetPlayerMoney(playerid) >= CBombP){
  1207.                     new string[120];
  1208.                     pbData[playerid][CBomb]++;
  1209.                     GivePlayerMoney(playerid, -CBombP);
  1210.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Car Bomb for $%i, the use instructions via /ehelp",CBombP);
  1211.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1212.                 }
  1213.                 else
  1214.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1215.             }
  1216.             case 4:{
  1217.                 if(GetPlayerMoney(playerid) >= ABombP){
  1218.                     new string[120];
  1219.                     pbData[playerid][ABomb]++;
  1220.                     GivePlayerMoney(playerid, -ABombP);
  1221.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought an Atomic Bomb for $%i, the use instructions via /ehelp",ABombP);
  1222.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1223.                 }
  1224.                 else
  1225.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1226.             }
  1227.             case 5:{
  1228.                 if(GetPlayerMoney(playerid) >= SBombP){
  1229.                     new string[120];
  1230.                     pbData[playerid][SBomb]++;
  1231.                     GivePlayerMoney(playerid, -SBombP);
  1232.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Sticky Bomb for $%i, the use instructions via /ehelp",SBombP);
  1233.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1234.                 }
  1235.                 else
  1236.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1237.             }
  1238.             case 6:{
  1239.                 if(GetPlayerMoney(playerid) >= SuBombP){
  1240.                     new string[120];
  1241.                     pbData[playerid][SuBomb]++;
  1242.                     GivePlayerMoney(playerid, -SuBombP);
  1243.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Suicidal Bomb vest for $%i, the use instructions via /ehelp",SuBombP);
  1244.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1245.                 }
  1246.                 else
  1247.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1248.             }
  1249.             case 7:{
  1250.                 if(GetPlayerMoney(playerid) >= QBombP){
  1251.                     new string[120];
  1252.                     pbData[playerid][QBomb]++;
  1253.                     GivePlayerMoney(playerid, -QBombP);
  1254.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Quantum bomb for $%i, the use instructions via /ehelp",QBombP);
  1255.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1256.                 }
  1257.                 else
  1258.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1259.             }
  1260.             case 8:{
  1261.                 if(GetPlayerMoney(playerid) >= MBombP){
  1262.                     new string[120];
  1263.                     pbData[playerid][MBomb]++;
  1264.                     GivePlayerMoney(playerid, -MBombP);
  1265.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Mine for $%i, the use instructions via /ehelp",MBombP);
  1266.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1267.                 }
  1268.                 else
  1269.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1270.             }
  1271.             case 9:{
  1272.                 if(GetPlayerMoney(playerid) >= EBarrelP){
  1273.                     new string[120];
  1274.                     pbData[playerid][EBBomb]++;
  1275.                     GivePlayerMoney(playerid, -EBarrelP);
  1276.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought an explosive barrel for $%i, the use instructions via /ehelp",EBarrelP);
  1277.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1278.                 }
  1279.                 else
  1280.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1281.             }
  1282.             case 10:{
  1283.                 if(GetPlayerMoney(playerid) >= ERCCP){
  1284.                     new string[120];
  1285.                     pbData[playerid][RCC]++;
  1286.                     GivePlayerMoney(playerid, -ERCCP);
  1287.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought an Explosive RC Car for $%i, the use instructions via /ehelp",ERCCP);
  1288.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1289.                 }
  1290.                 else
  1291.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1292.             }
  1293.             case 11:{
  1294.                 if(GetPlayerMoney(playerid) >= ERCHP){
  1295.                     new string[120];
  1296.                     pbData[playerid][RCH]++;
  1297.                     GivePlayerMoney(playerid, -ERCHP);
  1298.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought an Explosive Drone for $%i, the use instructions via /ehelp",ERCHP);
  1299.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1300.                 }
  1301.                 else
  1302.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1303.             }
  1304.         }
  1305.     }
  1306.     if(dialogid == DIALOG_TBomb){
  1307.         if(strval(inputtext)>60 || strval(inputtext)<3) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The seconds value must be closed between 3 and 60");
  1308.         pBombTimer[playerid] = SetTimerEx("TimingBombTimer",strval(inputtext)*1000, false, "i", playerid);
  1309.         GetPlayerPos(playerid, gC[0], gC[1], gC[2]);
  1310.         pBombPos[playerid][0] = gC[0];
  1311.         pBombPos[playerid][1] = gC[1];
  1312.         pBombPos[playerid][2] = gC[2];
  1313.         pBomb[playerid] = CreateObject(1252, gC[0], gC[1], gC[2], 0.0, 0.0,0.0);
  1314.         pbData[playerid][TBomb]--;
  1315.         pbData[playerid][BombUse] = false;
  1316.         pbData[playerid][BombEx] = true;
  1317.     }
  1318.     return 1;
  1319. }
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325. //Trials commands
  1326. CMD:veh(playerid, params[]){
  1327.     new Float:x,Float:y,Float:z;
  1328.     GetPlayerPos(playerid, x, y, z);
  1329.     CreateVehicle(411,x+1,y,z,0.0,1,1,100,0);
  1330.     return 1;
  1331. }
  1332. CMD:pony(playerid, params[]){
  1333.     new Float:x,Float:y,Float:z;
  1334.     GetPlayerPos(playerid, x, y, z);
  1335.     CreateVehicle(413,x+1,y,z,0.0,1,1,100,0);
  1336.     return 1;
  1337. }
  1338. CMD:kill(playerid, params[]){
  1339.     SetPlayerHealth(playerid, 0);
  1340.     return 1;
  1341. }
  1342. CMD:pass(playerid, params[]){
  1343.     pbData[playerid][BombUse] = true;
  1344.     return 1;
  1345. }
  1346. CMD:money(playerid, params[]){
  1347.     GivePlayerMoney(playerid, 100000);
  1348.     return 1;
  1349. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement