Advertisement
EOussama

EO_Explosives Shop version 1.2

Jan 12th, 2017
420
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 73.14 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, leave all credits,
  43. ==================================================================================================================================================================
  44. =====================================================================================================================================================================
  45. ==========================================================================|[ Configuration Panel ]|=================================================================*/
  46. //Bombs Prices
  47. #define BombP 2500      // Normal bomb
  48. #define TBombP 5000     //Settable timed bomb
  49. #define C4P 10000       //C4 remote-controlled
  50. #define CBombP 12000    //Vehicle bomb
  51. #define ABombP 20000    //Atomic Bomb
  52. #define SBombP 9000     //Stiky bomb
  53. #define SuBombP 6000    //Suicidal bomb
  54. #define QBombP 30000    //quantum  bomb
  55. #define MBombP 15000    //Mines
  56. #define EBarrelP 3500   //Explosive barrel
  57. #define ERCCP 15000 //Explosive RC Car
  58. #define ERCHP 20000 //Explosive RC Helicopter
  59. //Timers
  60. #define BrakingTimer 300000 //Timer between using each bomb
  61. #define VehicleBombClearTimer 300000 //Time to clear all vehicle car bombs
  62. /*=====================================================================================================================================================================
  63. ====================================================================================================================================================================*/
  64.  
  65. #define FILTERSCRIPT
  66.  
  67. #include <a_samp>
  68. #include <sscanf2>
  69. #include <streamer>
  70. #include <iZCMD>
  71.  
  72. //Colors*********************
  73. #define Blren 0x058E6A
  74. #define Red 0xFF0000
  75. #define Green 0x00FF22
  76. //***************************
  77.  
  78. #define MAX_EVM 20
  79.  
  80. new
  81.     Float:gC[3],
  82.     pBomb[MAX_PLAYERS],
  83.     pQBHydraucs[MAX_PLAYERS],
  84.     pQBCore[MAX_PLAYERS],
  85.     pBombTimer[MAX_PLAYERS],
  86.     pABICheck[MAX_PLAYERS],
  87.     pSBCheck[MAX_PLAYERS],
  88.     Float:pBombPos[MAX_PLAYERS][3],
  89.     Float:pABombPos[MAX_PLAYERS][3],
  90.     Float:pQBombPos[MAX_PLAYERS][3],
  91.     pSVBTimer[MAX_PLAYERS],
  92.     pQBombATimer[MAX_PLAYERS],
  93.     Float:pMPos[MAX_PLAYERS][3],
  94.     pMObject[MAX_PLAYERS],
  95.     pAMCheck[MAX_PLAYERS],
  96.     pRCC[MAX_PLAYERS],
  97.     pRCH[MAX_PLAYERS],
  98.     Text3D:pb3DText[MAX_PLAYERS],
  99.     Float:pRCPos[MAX_PLAYERS][3],
  100.     gEVM[MAX_EVM],
  101.     evmid;
  102.  
  103.  
  104. //DIALOGS
  105. enum{
  106.     DIALOG_EVMINDEX,
  107.     DIALOG_EVMPSTATS,
  108.     DIALOG_EHELP,
  109.     DIALOG_TBomb
  110. };
  111.  
  112. enum E_PLAYER_BOMB_DATA{
  113.     bool:BombUse,
  114.     bool:BombEx,
  115.     bool:BombC4,
  116.     bool:AtBomb,
  117.     bool:CarBomb,
  118.     bool:MBombEx,
  119.     bool:AMBomb,
  120.     bool:pSBomb,
  121.     Bomb,
  122.     SuBomb,
  123.     QBomb,
  124.     EBBomb,
  125.     TBomb,
  126.     MBomb,
  127.     CBomb,
  128.     ABomb,
  129.     SBomb,
  130.     C4,
  131.     RCC,
  132.     RCH
  133. };
  134.  
  135. enum EVM_DATA{
  136.     Float:PosX,
  137.     Float:PosY,
  138.     Float:PosZ,
  139.     Float:RotX,
  140.     Float:RotY,
  141.     Float:RotZ,
  142.     EVMBlocked,
  143.     Text3D:EVM3DT
  144. };
  145.  
  146. GetName(playerid){
  147.     new fpname[MAX_PLAYER_NAME];
  148.     GetPlayerName(playerid, fpname, sizeof(fpname));
  149.     return fpname;
  150. }
  151.  
  152. new EVMData[MAX_EVM][EVM_DATA];
  153.  
  154.  
  155. new pbData[MAX_PLAYERS][E_PLAYER_BOMB_DATA];
  156. new vbData[MAX_VEHICLES][E_PLAYER_BOMB_DATA];
  157.  
  158. //TIMERS
  159. forward BombTimer(playerid);
  160. forward TimingBombTimer(playerid);
  161. forward VehicleCarBombClear(vehicleid);
  162. forward CarBombActivation(vehicleid);
  163. forward atomicbombimpact(playerid);
  164. forward SuVBTimer(playerid);
  165. forward QuantumBombActivation(playerid);
  166.  
  167. stock ClearBombs(playerid){
  168.     pbData[playerid][Bomb] = 0;
  169.     pbData[playerid][RCC] = 0;
  170.     pbData[playerid][RCH] = 0;
  171.     pbData[playerid][SuBomb] = 0;
  172.     pbData[playerid][QBomb] = 0;
  173.     pbData[playerid][EBBomb] = 0;
  174.     pbData[playerid][TBomb] = 0;
  175.     pbData[playerid][MBomb] = 0;
  176.     pbData[playerid][C4] = 0;
  177.     pbData[playerid][CBomb] = 0;
  178.     pbData[playerid][ABomb] = 0;
  179.     pbData[playerid][SBomb] = 0;
  180.     pbData[playerid][RCC] = 0;
  181.     pbData[playerid][RCH] = 0;
  182. }
  183.  
  184. new DB:Database;
  185.  
  186. #if defined FILTERSCRIPT
  187.  
  188. public OnFilterScriptInit()
  189. {
  190.     new query[40],str[86],Count=0,DBResult:DATA;
  191.     print("\n--------------------------------------");
  192.     print("        EO_Explosives Shop v1.2         ");
  193.     print("--------------------------------------\n");
  194.  
  195.     if((Database = db_open("Database.db")) == DB:0){
  196.         printf("[EVM]: Connection to database failed!");
  197.     }
  198.     else{
  199.         db_free_result(db_query(Database, "CREATE TABLE IF NOT EXISTS `EVM`(`ID` INTEGER PRIMARY KEY, `PosX` FLOAT DEFAULT 0.0,`PosY` FLOAT DEFAULT 0.0,`PosZ` FLOAT DEFAULT 0.0,`RotX` FLOAT DEFAULT 0.0,`RotY` FLOAT DEFAULT 0.0,`RotZ` FLOAT DEFAULT 0.0, `Block` INTEGER DEFAULT 0 NOT NULL)"));
  200.         printf("[EVM]: Connection to database was successful");
  201.     }
  202.     printf("\n  ***| Explosives Vending Machines Loading... |***");
  203.     for(new i=1; i<MAX_EVM;i++){
  204.         format(query,sizeof(query), "SELECT * FROM `EVM` WHERE `ID` = %i",i);
  205.         DATA = db_query(Database, query);
  206.         if(db_num_rows(DATA)){
  207.             EVMData[i][PosX] = db_get_field_assoc_float(DATA, "PosX");
  208.             EVMData[i][PosY] = db_get_field_assoc_float(DATA, "PosY");
  209.             EVMData[i][PosZ] = db_get_field_assoc_float(DATA, "PosZ");
  210.             EVMData[i][RotX] = db_get_field_assoc_float(DATA, "RotX");
  211.             EVMData[i][RotY] = db_get_field_assoc_float(DATA, "RotY");
  212.             EVMData[i][RotZ] = db_get_field_assoc_float(DATA, "RotZ");
  213.             EVMData[i][EVMBlocked] = db_get_field_assoc_int(DATA, "Block");
  214.             db_free_result(DATA);
  215.             gEVM[i] = CreateDynamicObject(18885, EVMData[i][PosX], EVMData[i][PosY], EVMData[i][PosZ], EVMData[i][RotX], EVMData[i][RotY], EVMData[i][RotZ], -1, -1, -1, 110, 100);
  216.             format(str, sizeof(str), "Explosive Vending Machine\nEVM ID: %i\n{FFFFFF}Press {FFFF00}N {FFFFFF}to interfere", i);
  217.             EVMData[i][EVM3DT] = CreateDynamic3DTextLabel(str, 0xFFFF0088, EVMData[i][PosX], EVMData[i][PosY], EVMData[i][PosZ], 80, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 95);
  218.             Count++;
  219.             printf("EVM ID: %i Loaded successfully",i);
  220.         }
  221.     }
  222.     SetGameModeText("EO_Explosives Shop v1.2");
  223.     printf("  ***| %i EVM(s) Loaded |***\n",Count);
  224.  
  225.     SetTimer("VehicleCarBombClear",VehicleBombClearTimer,true);
  226.     return 1;
  227. }
  228.  
  229. #else
  230.  
  231. #endif
  232. public OnGameModeExit(){
  233.     db_close(Database);
  234.     return 1;
  235. }
  236. public OnPlayerRequestClass(playerid, classid)
  237. {
  238.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  239.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  240.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  241.     return 1;
  242. }
  243.  
  244. public OnPlayerConnect(playerid)
  245. {
  246.     ClearBombs(playerid);
  247.     return 1;
  248. }
  249.  
  250. public OnPlayerSpawn(playerid)
  251. {
  252.     SendClientMessage(playerid, Green, "[SERVER]: {FFFFFF}EO_Explosives Shop v1.2, see related commands via /evmcmds");
  253.     pbData[playerid][BombEx] = false;
  254.     pbData[playerid][BombC4] = false;
  255.     pbData[playerid][AtBomb] = false;
  256.     pbData[playerid][pSBomb] = false;
  257.     pbData[playerid][MBombEx] = false;
  258.     pbData[playerid][CarBomb] = false;
  259.     pbData[playerid][MBombEx] = false;
  260.     pbData[playerid][AMBomb] = false;
  261.     pbData[playerid][pSBomb] = false;
  262.     pbData[playerid][Bomb] = 0;
  263.     pbData[playerid][SuBomb] = 0;
  264.     pbData[playerid][QBomb] = 0;
  265.     pbData[playerid][EBBomb] = 0;
  266.     pbData[playerid][TBomb] = 0;
  267.     pbData[playerid][MBomb] = 0;
  268.     pbData[playerid][CBomb] = 0;
  269.     pbData[playerid][ABomb] = 0;
  270.     pbData[playerid][SBomb] = 0;
  271.     pbData[playerid][C4] = 0;
  272.     pbData[playerid][RCC] = 0;
  273.     pbData[playerid][RCH] = 0;
  274.     TogglePlayerControllable(playerid, true);
  275.     return 1;
  276. }
  277.  
  278. public OnPlayerDeath(playerid, killerid, reason)
  279. {
  280.     if(pbData[playerid][BombEx] == true){
  281.         SendClientMessage(playerid, Red, "[EO_INFO]: {FFFFFF}The Bomb you planted has been deactivated");
  282.         DestroyObject(pBomb[playerid]);
  283.     }
  284.     return 1;
  285. }
  286.  
  287. public OnVehicleDeath(vehicleid, killerid)
  288. {
  289.     if(vbData[vehicleid][CarBomb] == true)
  290.         vbData[vehicleid][CarBomb] = false;
  291.     return 1;
  292. }
  293.  
  294. //explosives stats
  295. CMD:estats(playerid){
  296.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  297.     new pname[MAX_PLAYER_NAME], str[1050];
  298.     GetPlayerName(playerid, pname, sizeof(pname));
  299.     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",
  300.     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]);
  301.     ShowPlayerDialog(playerid, DIALOG_EVMPSTATS, DIALOG_STYLE_MSGBOX, "EO_Explosive Stats", str, "Got it!", "");
  302.     return 1;
  303. }
  304.  
  305. //Explosives help index
  306. CMD:ehelp(playerid){
  307.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  308.     new str[2500];
  309.     strcat(str,"{FFFF00}Bomb: {FFFFFF}A 3 seconds timed bomb with a normal exploding radius, it can be used via /plantbomb\n");
  310.     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");
  311.     strcat(str,"{FFFF00}C4: {FFFFFF}A Remote-controlled bomb, which can be setup somewhere using /plantc4 then detonated via /detonate\n");
  312.     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");
  313.     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");
  314.     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");
  315.     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");
  316.     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");
  317.     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");
  318.     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");
  319.     strcat(str,"{FFFF00}Explosive RC Car: {FFFFFF} A Remote controlled mini-car (basically a moving bomb), it can be used via /activaterccar\n");
  320.     strcat(str,"{FFFF00}Explosive Drone: {FFFFFF} A Remote controlled mini-helicopter (basically a moving bomb), it can be used via /activatedrone\n");
  321.     ShowPlayerDialog(playerid, DIALOG_EHELP, DIALOG_STYLE_MSGBOX, "EO_Explosives Help Section", str, "Got it","");
  322.     return 1;
  323. }
  324.  
  325. CMD:evmcmds(playerid){
  326.     if(IsPlayerAdmin(playerid)){
  327.         SendClientMessage(playerid, 0xFFFF0088, "|============EO_Explosive Shop Commands===========|");
  328.         SendClientMessage(playerid, 0xFFFFCC90, "| /evmcmds   ||  /evmshop   ||  /estats  ||  /ehelp |");
  329.         SendClientMessage(playerid, 0xFFFFCC90, "|    /givebombs ||  /setbombs  ||  /clearbombs     |");
  330.         SendClientMessage(playerid, 0xFFFFCC90, "|      /makeevm ||  /editevm   ||  /deleteevm      |");
  331.         SendClientMessage(playerid, 0xFFFFCC90, "|     /evmstats ||  /blockevm  ||  /unblockevm    |");
  332.         SendClientMessage(playerid, 0xFFFF0088, "|=================================================|");
  333.     }
  334.     else{
  335.         SendClientMessage(playerid, 0xFFFF0088, "|============EO_Explosive Shop Commands===========|");
  336.         SendClientMessage(playerid, 0xFFFFCC90, "| /evmcmds   ||  /evmshop   ||  /estats  ||  /ehelp |");
  337.         SendClientMessage(playerid, 0xFFFF0088, "|=================================================|");
  338.     }
  339.    
  340.     return 1;
  341. }
  342.  
  343. /*CMD:evmshop(playerid){
  344.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  345.     ShowPlayerDialog(playerid, DIALOG_EVMINDEX, DIALOG_STYLE_LIST, "EO_Explosive Shop",
  346.     "Bomb\n\
  347.     Timing bomb\n\
  348.     C4\n\
  349.     Car bomb\n\
  350.     Atomic bomb\n\
  351.     Sticky bombs\n\
  352.     Suicidal bomb vest\n\
  353.     Quantum bomb\n\
  354.     Mines\n\
  355.     Explosive barrels\n\
  356.     Explosive RC Car\n\
  357.     Explosive Drone"
  358.     ,"Select", "Cancel");
  359.     return 1;
  360. }*/
  361. ///////////////////////////  ADMIN CMDS  /////////////////////////////////////
  362. CMD:givebombs(playerid,params[]){
  363.     new tid, tname[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], bname[10], amount, str[MAX_PLAYER_NAME+60];
  364.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  365.     if(IsPlayerAdmin(playerid)){
  366.         if(sscanf(params, "us[10]i",tid,bname,amount)) return SendClientMessage(playerid, Red, "[USAGE]: /givebombs (playerid) (bomb/tbomb/c4/cbomb/abomb/qbomb/mine/ebarrel/rccar/drone/sbomb/subomb) (amount)");
  367.         GetPlayerName(playerid, pname, sizeof(pname));
  368.         GetPlayerName(tid, tname, sizeof(tname));
  369.         if(IsPlayerConnected(tid)){
  370.             if(!strcmp(bname, "bomb", true)){
  371.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  372.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Bomb(s)",pname,amount);
  373.                 SendClientMessage(tid, Blren, str);
  374.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i bomb(s)",tid,amount);
  375.                 SendClientMessage(playerid, Blren, str);
  376.                 pbData[tid][Bomb] += amount;
  377.             }
  378.             if(!strcmp(bname, "tbomb", true)){
  379.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  380.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Timing Bomb(s)",pname,amount);
  381.                 SendClientMessage(tid, Blren, str);
  382.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Timing bomb(s)",tid,amount);
  383.                 SendClientMessage(playerid, Blren, str);
  384.                 pbData[tid][TBomb] += amount;
  385.             }
  386.             if(!strcmp(bname, "c4", true)){
  387.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  388.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i C4(s)",pname,amount);
  389.                 SendClientMessage(tid, Blren, str);
  390.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i C4(s)",tid,amount);
  391.                 SendClientMessage(playerid, Blren, str);
  392.                 pbData[tid][C4] += amount;
  393.             }
  394.             if(!strcmp(bname, "cbomb", true)){
  395.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  396.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Car Bomb(s)",pname,amount);
  397.                 SendClientMessage(tid, Blren, str);
  398.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Car bomb(s)",tid,amount);
  399.                 SendClientMessage(playerid, Blren, str);
  400.                 pbData[tid][CBomb] += amount;
  401.             }
  402.             if(!strcmp(bname, "abomb", true)){
  403.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  404.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Atomic Bomb(s)",pname,amount);
  405.                 SendClientMessage(tid, Blren, str);
  406.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Atomic bomb(s)",tid,amount);
  407.                 SendClientMessage(playerid, Blren, str);
  408.                 pbData[tid][ABomb] += amount;
  409.             }
  410.             if(!strcmp(bname, "qbomb", true)){
  411.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  412.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Quantum Bomb(s)",pname,amount);
  413.                 SendClientMessage(tid, Blren, str);
  414.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Quantum bomb(s)",tid,amount);
  415.                 SendClientMessage(playerid, Blren, str);
  416.                 pbData[tid][QBomb] += amount;
  417.             }
  418.             if(!strcmp(bname, "mine", true)){
  419.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  420.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Mine(s)",pname,amount);
  421.                 SendClientMessage(tid, Blren, str);
  422.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Mine(s)",tid,amount);
  423.                 SendClientMessage(playerid, Blren, str);
  424.                 pbData[tid][MBomb] += amount;
  425.             }
  426.             if(!strcmp(bname, "ebarrel", true)){
  427.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  428.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Explosive Barrel(s)",pname,amount);
  429.                 SendClientMessage(tid, Blren, str);
  430.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Explosive Barrel(s)",tid,amount);
  431.                 SendClientMessage(playerid, Blren, str);
  432.                 pbData[tid][EBBomb] += amount;
  433.             }
  434.             if(!strcmp(bname, "rccar", true)){
  435.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  436.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Explosive RC Car(s)",pname,amount);
  437.                 SendClientMessage(tid, Blren, str);
  438.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Explosive RC Car(s)",tid,amount);
  439.                 SendClientMessage(playerid, Blren, str);
  440.                 pbData[tid][RCC] += amount;
  441.             }
  442.             if(!strcmp(bname, "drone", true)){
  443.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  444.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Explosive drone(s)",pname,amount);
  445.                 SendClientMessage(tid, Blren, str);
  446.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Explosive drone(s)",tid,amount);
  447.                 SendClientMessage(playerid, Blren, str);
  448.                 pbData[tid][RCH] += amount;
  449.             }
  450.             if(!strcmp(bname, "sbomb", true)){
  451.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  452.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Sticky bomb(s)",pname,amount);
  453.                 SendClientMessage(tid, Blren, str);
  454.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Sticky bomb(s)",tid,amount);
  455.                 SendClientMessage(playerid, Blren, str);
  456.                 pbData[tid][SBomb] += amount;
  457.             }
  458.             if(!strcmp(bname, "subomb", true)){
  459.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  460.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s Has given you %i Suicidal Vest(s)",pname,amount);
  461.                 SendClientMessage(tid, Blren, str);
  462.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Suicidal Vest(s)",tid,amount);
  463.                 SendClientMessage(playerid, Blren, str);
  464.                 pbData[tid][SuBomb] += amount;
  465.             }
  466.         }
  467.         else{
  468.             SendClientMessage(playerid, 0xFF000088, "[ERROR]: That player isn't connected");
  469.         }
  470.     }
  471.     else{
  472.         SendClientMessage(playerid,0xFF000088,"[ERROR]: You are not authorized to use that");
  473.     }
  474.     return 1;
  475. }
  476.  
  477.  
  478. CMD:setbombs(playerid, params[]){
  479.     new tid, tname[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], bname[10], amount, str[MAX_PLAYER_NAME+60];
  480.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  481.     if(IsPlayerAdmin(playerid)){
  482.         if(sscanf(params, "us[10]i",tid,bname,amount)) return SendClientMessage(playerid, Red, "[USAGE]: /setbombs (playerid) (bomb/tbomb/c4/cbomb/abomb/qbomb/mine/ebarrel/rccar/drone/sbomb/subomb) (amount)");
  483.         GetPlayerName(playerid, pname, sizeof(pname));
  484.         GetPlayerName(tid, tname, sizeof(tname));
  485.         if(IsPlayerConnected(tid)){
  486.             if(!strcmp(bname, "bomb", true)){
  487.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  488.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your bombs to %i",pname,amount);
  489.                 SendClientMessage(tid, Blren, str);
  490.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's bombs to %i",tid,amount);
  491.                 SendClientMessage(playerid, Blren, str);
  492.                 pbData[tid][Bomb] = amount;
  493.             }
  494.             if(!strcmp(bname, "tbomb", true)){
  495.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  496.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Timing bombs to %i",pname,amount);
  497.                 SendClientMessage(tid, Blren, str);
  498.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Timing bombs to %i",tid,amount);
  499.                 SendClientMessage(playerid, Blren, str);
  500.                 pbData[tid][TBomb] = amount;
  501.             }
  502.             if(!strcmp(bname, "c4", true)){
  503.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  504.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your C4s to %i",pname,amount);
  505.                 SendClientMessage(tid, Blren, str);
  506.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's C4s to %i",tid,amount);
  507.                 SendClientMessage(playerid, Blren, str);
  508.                 pbData[tid][C4] = amount;
  509.             }
  510.             if(!strcmp(bname, "cbomb", true)){
  511.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  512.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Car bombs to %i",pname,amount);
  513.                 SendClientMessage(tid, Blren, str);
  514.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Car bombs to %i",tid,amount);
  515.                 SendClientMessage(playerid, Blren, str);
  516.                 pbData[tid][CBomb] = amount;
  517.             }
  518.             if(!strcmp(bname, "abomb", true)){
  519.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  520.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Atomic bombs to %i",tid,amount);
  521.                 SendClientMessage(tid, Blren, str);
  522.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have given %s %i Atomic bomb(s)",tid,amount);
  523.                 SendClientMessage(playerid, Blren, str);
  524.                 pbData[tid][ABomb] = amount;
  525.             }
  526.             if(!strcmp(bname, "qbomb", true)){
  527.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  528.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Quantum bombs to %i",pname,amount);
  529.                 SendClientMessage(tid, Blren, str);
  530.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Quantum bombs to %i",tid,amount);
  531.                 SendClientMessage(playerid, Blren, str);
  532.                 pbData[tid][QBomb] = amount;
  533.             }
  534.             if(!strcmp(bname, "mine", true)){
  535.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  536.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Mines to %i",pname,amount);
  537.                 SendClientMessage(tid, Blren, str);
  538.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Mines to %i",tid,amount);
  539.                 SendClientMessage(playerid, Blren, str);
  540.                 pbData[tid][MBomb] = amount;
  541.             }
  542.             if(!strcmp(bname, "ebarrel", true)){
  543.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  544.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Explosive barrels to %i",pname,amount);
  545.                 SendClientMessage(tid, Blren, str);
  546.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Explosive barrels to %i",tid,amount);
  547.                 SendClientMessage(playerid, Blren, str);
  548.                 pbData[tid][EBBomb] = amount;
  549.             }
  550.             if(!strcmp(bname, "rccar", true)){
  551.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  552.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Explosive RC Cars to %i",pname,amount);
  553.                 SendClientMessage(tid, Blren, str);
  554.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Explosive RC Cars to %i",tid,amount);
  555.                 SendClientMessage(playerid, Blren, str);
  556.                 pbData[tid][RCC] = amount;
  557.             }
  558.             if(!strcmp(bname, "drone", true)){
  559.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  560.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Explosive Drones to %i",pname,amount);
  561.                 SendClientMessage(tid, Blren, str);
  562.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Explosive Drones to %i",tid,amount);
  563.                 SendClientMessage(playerid, Blren, str);
  564.                 pbData[tid][RCH] = amount;
  565.             }
  566.             if(!strcmp(bname, "sbomb", true)){
  567.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  568.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Sticky bombs to %i",pname,amount);
  569.                 SendClientMessage(tid, Blren, str);
  570.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Sticky bombs to %i",tid,amount);
  571.                 SendClientMessage(playerid, Blren, str);
  572.                 pbData[tid][SBomb] = amount;
  573.             }
  574.             if(!strcmp(bname, "subomb", true)){
  575.                 if(amount<0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The minimum amount of bombs is 0");
  576.                 format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s set your Suicidal Vests to %i",pname,amount);
  577.                 SendClientMessage(tid, Blren, str);
  578.                 format(str, sizeof(str),"[INFO]:{FFFFFF}You have set %s's Suicidal Vests to %i",tid,amount);
  579.                 SendClientMessage(playerid, Blren, str);
  580.                 pbData[tid][SuBomb] = amount;
  581.             }
  582.         }
  583.         else{
  584.             SendClientMessage(playerid, 0xFF000088, "[ERROR]: That player isn't connected");
  585.         }
  586.     }
  587.     else{
  588.         SendClientMessage(playerid,0xFF000088,"[ERROR]: You are not authorized to use that");
  589.     }
  590.     return 1;
  591. }
  592.  
  593.  
  594. CMD:clearbombs(playerid, params[]){
  595.     new tid, tname[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], str[MAX_PLAYER_NAME+35];
  596.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  597.     if(IsPlayerAdmin(playerid)){
  598.         if(sscanf(params, "us[10]i",tid)) return SendClientMessage(playerid, Red, "[USAGE]: /clearbombs (playerid)");
  599.         GetPlayerName(playerid, pname, sizeof(pname));
  600.         GetPlayerName(tid, tname, sizeof(tname));
  601.         if(IsPlayerConnected(tid)){
  602.             ClearBombs(tid);
  603.             format(str, sizeof(str),"[INFO]:{FFFFFF}Administrator %s has cleared your bombs",pname);
  604.             SendClientMessage(tid, Blren, str);
  605.             format(str, sizeof(str),"[INFO]:{FFFFFF}Your bombs have been cleared",tid);
  606.             SendClientMessage(playerid, Blren, str);
  607.         }
  608.     }
  609.     return 1;
  610. }
  611.  
  612. CMD:makeevm(playerid,params[]){
  613.     new str1[75],ID,query[200],DBResult:Result;
  614.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  615.     if(IsPlayerAdmin(playerid)){
  616.         if(!IsPlayerInAnyVehicle(playerid)){
  617.             if(sscanf(params, "i",ID)) return SendClientMessage(playerid, Red, "[USAGE]: /makeevm (ID)");
  618.             if(ID >= MAX_EVM || ID <= 0) return SendClientMessage(playerid, Red, "[ERROR]: Invalid ID");
  619.             format(query, sizeof(query), "SELECT * FROM `EVM` WHERE ID = %d",ID);
  620.             Result = db_query(Database, query);
  621.             if(db_num_rows(Result)) return SendClientMessage(playerid, Red, "[ERROR]: That slot is used, clear it using /deleteevm or chose another vailable slot via /evmstats");
  622.             db_free_result(Result);
  623.             evmid = ID;
  624.             GetPlayerPos(playerid, EVMData[ID][PosX], EVMData[ID][PosY], EVMData[ID][PosZ]);
  625.             gEVM[ID] = CreateDynamicObject(18885, EVMData[ID][PosX]+1, EVMData[ID][PosY], EVMData[ID][PosZ], 0.0, 0.0, 0.0, -1, -1, -1, 115, 100);
  626.             EditDynamicObject(playerid, gEVM[ID]);
  627.             format(str1, sizeof(str1), "[EO_EVM]: {FFFFFF}Explosives Vending Machine successfully created! ID:%i",ID);
  628.             SendClientMessage(playerid, 0xFFFF00, str1);
  629.             printf("Administrator %s Created a new EVM, ID: %i", GetName(playerid), ID);
  630.             EVMData[ID][EVMBlocked] = 0;
  631.             format(query, sizeof(query), "INSERT INTO `EVM`(`PosX`,`PosY`,`PosZ`,`RotX`,`RotY`,`RotZ`,`Block`) VALUES (%f,%f,%f,%f,%f,%f,%d)", EVMData[ID][PosX], EVMData[ID][PosY], EVMData[ID][PosZ], EVMData[ID][RotX], EVMData[ID][RotY], EVMData[ID][RotZ],EVMData[ID][EVMBlocked]);
  632.             db_free_result(db_query(Database, query));
  633.             return 1;
  634.         }
  635.         else{
  636.             SendClientMessage(playerid, 0xFF0000, "[ERROR]: You can't use this while in a vehicle");
  637.         }
  638.     }
  639.     else{
  640.         SendClientMessage(playerid, 0xFF0000AA, "[ERROR]: You can't use this command");
  641.     }
  642.     return 1;
  643. }
  644. public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
  645. {
  646.     new str[85],query[500];
  647.     if(response == EDIT_RESPONSE_FINAL)
  648.     {
  649.         format(str, sizeof(str), "Explosive Vending Machine\nEVM ID: %i\n{FFFFFF}Press {FFFF00}N {FFFFFF}to interfere", evmid);
  650.         EVMData[evmid][EVM3DT] = CreateDynamic3DTextLabel(str, 0xFFFF0088, fX, fY, fZ, 80, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 95);
  651.         EVMData[evmid][PosX] = fX;
  652.         EVMData[evmid][PosY] = fY;
  653.         EVMData[evmid][PosZ] = fZ;
  654.         EVMData[evmid][RotX] = fRotX;
  655.         EVMData[evmid][RotY] = fRotY;
  656.         EVMData[evmid][RotZ] = fRotZ;
  657.        
  658.         format(query, sizeof(query), "UPDATE `EVM` SET `PosX` = %f, `PosY` = %f, `PosZ` = %f, `RotX` = %f, `RotY` = %f, `RotZ` = %f WHERE `ID` = %d", EVMData[evmid][PosX],EVMData[evmid][PosY],EVMData[evmid][PosZ],EVMData[evmid][RotX],EVMData[evmid][RotY],EVMData[evmid][RotZ],evmid);
  659.         db_free_result(db_query(Database, query));
  660.     }
  661.     return 1;
  662. }
  663.  
  664. CMD:deleteevm(playerid, params[]){
  665.     new str1[75],ID,query[200],DBResult:Result;
  666.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  667.     if(IsPlayerAdmin(playerid)){
  668.         if(!IsPlayerInAnyVehicle(playerid)){
  669.             if(sscanf(params, "i", ID)) return SendClientMessage(playerid, Red, "[USAGE]: /deleteevm (ID)");
  670.             if(ID >= MAX_EVM || ID <= 0) return SendClientMessage(playerid, Red, "[ERROR]: Invalid ID");
  671.             format(query, sizeof(query), "SELECT * FROM `EVM` WHERE ID = %d",ID);
  672.             Result = db_query(Database, query);
  673.             if(!db_num_rows(Result)) return SendClientMessage(playerid, Red, "[ERROR]: This slot is already clear");
  674.             db_free_result(Result);
  675.             DestroyDynamicObject(gEVM[ID]);
  676.             DestroyDynamic3DTextLabel(EVMData[ID][EVM3DT]);
  677.             printf("Administrator %s Deleted an EVM, ID: %i", GetName(playerid), ID);
  678.             format(str1, sizeof(str1), "[EO_EVM]: {FFFFFF}Explosives Vending Machine successfully deleted! ID:%i",ID);
  679.             SendClientMessage(playerid, 0xFFFF00, str1);
  680.             format(query, sizeof(query), "DELETE FROM `EVM` WHERE `ID` = %d",ID);
  681.             Result = db_query(Database, query);
  682.             db_free_result(Result);
  683.             return 1;
  684.         }
  685.         else{
  686.             SendClientMessage(playerid, 0xFF0000, "[ERROR]: You can't use this while in a vehicle");
  687.         }
  688.     }
  689.     else{
  690.         SendClientMessage(playerid, 0xFF0000AA, "[ERROR]: You can't use this command");
  691.     }
  692.     return 1;
  693. }
  694.  
  695. CMD:editevm(playerid, params[]){
  696.     new str1[78],ID,query[200],DBResult:Result;
  697.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  698.     if(IsPlayerAdmin(playerid)){
  699.         if(!IsPlayerInAnyVehicle(playerid)){
  700.             if(sscanf(params, "i", ID)) return SendClientMessage(playerid, Red, "[USAGE]: /editevm (ID)");
  701.             if(ID >= MAX_EVM || ID <= 0) return SendClientMessage(playerid, Red, "[ERROR]: Invalid ID");
  702.             format(query, sizeof(query), "SELECT * FROM `EVM` WHERE ID = %d",ID);
  703.             Result = db_query(Database, query);
  704.             if(!db_num_rows(Result)) return SendClientMessage(playerid, Red, "[ERROR]: This slot has no EVM");
  705.             db_free_result(Result);
  706.             evmid = ID;
  707.             EditDynamicObject(playerid, gEVM[ID]);
  708.             DestroyDynamic3DTextLabel(EVMData[ID][EVM3DT]);
  709.             format(str1, sizeof(str1), "[EO_EVM]: {FFFFFF}Explosives Vending Machine with the ID %i is being edited!",ID);
  710.             SendClientMessage(playerid, 0xFFFF00, str1);
  711.             printf("Administrator %s is editing the EVM with the ID %i", GetName(playerid), ID);
  712.             return 1;
  713.         }
  714.         else{
  715.             SendClientMessage(playerid, 0xFF0000, "[ERROR]: You can't use this while in a vehicle");
  716.         }
  717.     }
  718.     else{
  719.         SendClientMessage(playerid, 0xFF0000AA, "[ERROR]: You can't use this command");
  720.     }
  721.     return 1;
  722. }
  723. CMD:evmstats(playerid){
  724.     new str[60],Count=0,string[22],query[40],DBResult:Result,string2[20];
  725.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  726.     if(IsPlayerAdmin(playerid)){
  727.         if(!IsPlayerInAnyVehicle(playerid)){
  728.             SendClientMessage(playerid, 0xAF6D37DE, "||=========Explosive Vending Machines States=========||");
  729.             for(new i=1;i<MAX_EVM;i++){
  730.                 format(query, sizeof(query), "SELECT * FROM `EVM` WHERE ID = %d",i);
  731.                 Result = db_query(Database, query);            
  732.                 if(db_num_rows(Result)){
  733.                     string = "{E30000}Not Available" ;
  734.                     if(EVMData[i][EVMBlocked] == 1) string2 = "{E30000}Blocked";
  735.                     else string2 = "{00A700}Not Blocked";
  736.                 }
  737.                 else{
  738.                     string = "{00A700}Available";
  739.                     string2 = "{E3CC00}N/A";
  740.                     Count++;
  741.                 }
  742.                 format(str, sizeof(str), "EVM ID: %i | %s | %s",i,string, string2);
  743.                 SendClientMessage(playerid,0xAFA700DE,str);
  744.                 db_free_result(Result);
  745.             }
  746.             SendClientMessage(playerid, 0xAF6D37DE, "||===================================================||");
  747.             if(Count == 0) SendClientMessage(playerid,Blren,"[EO_INFO]: {FFFFFF}No Explosives Vending Machines slots available, clear any slot you want using /deleteevm");
  748.             else format(str, sizeof(str), "Available slots found: %i",Count) && SendClientMessage(playerid,0xAFA700DE,str);
  749.         }
  750.     }
  751.     else{
  752.         SendClientMessage(playerid, 0xFF0000AA, "[ERROR]: You can't use this command");
  753.     }
  754.     return 1;
  755.  
  756. }
  757. CMD:blockevm(playerid, params[]){
  758.     new str[80],ID,query[55],DBResult:Result;
  759.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  760.     if(IsPlayerAdmin(playerid)){
  761.         if(!IsPlayerInAnyVehicle(playerid)){
  762.             if(sscanf(params, "i", ID)) return SendClientMessage(playerid, Red, "[USAGE]: /blockevm (ID)");
  763.             if(ID<=0 || ID>=MAX_EVM) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Invalid ID");
  764.             format(query, sizeof(query), "SELECT * FROM `EVM` WHERE ID = %d",ID);
  765.             Result = db_query(Database, query);          
  766.             if(!db_num_rows(Result)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: No EVM with this ID exist");
  767.             db_free_result(Result);
  768.             if(EVMData[ID][EVMBlocked] == 1) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: This EVM is already blocked");
  769.             EVMData[ID][EVMBlocked] = 1;
  770.             format(str, sizeof(str), "[EO_INFO]: {FFFFFF}You have blocked the Explosive vending machine with ID: %i",ID);
  771.             SendClientMessage(playerid, Blren, str);
  772.             printf("Administrator %s has blocked the EVM with ID: %i",GetName(playerid),ID);
  773.             format(query, sizeof(query), "UPDATE `EVM` SET `Block` = %d WHERE `ID` = %d",EVMData[ID][EVMBlocked],ID);
  774.             Result = db_query(Database, query);      
  775.             db_free_result(Result);
  776.         }
  777.         else
  778.             SendClientMessage(playerid, 0xFF0000AA, "[ERROR]: You can't use this command while in a vehicle");
  779.     }
  780.     else
  781.         SendClientMessage(playerid, 0xFF0000AA, "[ERROR]: You can't use this command");
  782.     return 1;
  783. }
  784. CMD:unblockevm(playerid, params[]){
  785.     new str[82],ID,query[55],DBResult:Result;
  786.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  787.     if(IsPlayerAdmin(playerid)){
  788.         if(!IsPlayerInAnyVehicle(playerid)){
  789.             if(sscanf(params, "i", ID)) return SendClientMessage(playerid, Red, "[USAGE]: /unblockevm (ID)");
  790.             if(ID<=0 ||ID>=MAX_EVM) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Invalid ID");
  791.             format(query, sizeof(query), "SELECT * FROM `EVM` WHERE ID = %d",ID);
  792.             Result = db_query(Database, query);          
  793.             if(!db_num_rows(Result)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: No EVM with this ID exist");
  794.             db_free_result(Result);
  795.             if(EVMData[ID][EVMBlocked] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: This EVM is already available to use");
  796.             EVMData[ID][EVMBlocked] = 0;
  797.             format(str, sizeof(str), "[EO_INFO]: {FFFFFF}You have unblocked the Explosive vending machine with ID: %i",ID);
  798.             SendClientMessage(playerid, Blren, str);
  799.             printf("Administrator %s has unblocked the EVM with ID: %i",GetName(playerid),ID);
  800.             format(query, sizeof(query), "UPDATE `EVM` SET `Block` = %d WHERE `ID` = %d",EVMData[ID][EVMBlocked],ID);
  801.             Result = db_query(Database, query);      
  802.             db_free_result(Result);
  803.         }
  804.         else
  805.             SendClientMessage(playerid, 0xFF0000AA, "[ERROR]: You can't use this command while in a vehicle");
  806.     }
  807.     else
  808.         SendClientMessage(playerid, 0xFF0000AA, "[ERROR]: You can't use this command");
  809.     return 1;
  810. }
  811. CMD:evmtp(playerid, params[]){
  812.     new string0[43],ID,query[55],DBResult:Result;
  813.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  814.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Red, "[ERROR]: You are not authorized to use this!");
  815.     if(sscanf(params, "i", ID)) return SendClientMessage(playerid, Red, "[USAGE]: /evmtp (ID)");
  816.     format(query, sizeof(query), "SELECT * FROM `EVM` WHERE ID = %d",ID);
  817.     Result = db_query(Database, query);          
  818.     if(!db_num_rows(Result)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: No EVM with this ID exist");
  819.     db_free_result(Result);
  820.     SetPlayerPos(playerid, EVMData[ID][PosX],EVMData[ID][PosY],EVMData[ID][PosZ]);
  821.     format(string0,sizeof(string0),"[INFO]: You have teleported to EVM ID: %i",ID);
  822.     SendClientMessage(playerid, Blren, string0);
  823.     return 1;
  824. }
  825. //////////////////////////   BOMBS    ////////////////////////////////////////
  826.  
  827. //Bomb
  828. CMD:plantbomb(playerid, params[]){
  829.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  830.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  831.     if(pbData[playerid][Bomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a bomb");
  832.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  833.     GetPlayerPos(playerid, gC[0], gC[1], gC[2]);
  834.     pBomb[playerid] = CreateObject(1252, gC[0], gC[1], gC[2], 0.0, 0.0,0.0);
  835.     pBombPos[playerid][0] = gC[0];
  836.     pBombPos[playerid][1] = gC[1];
  837.     pBombPos[playerid][2] = gC[2];
  838.     pBombTimer[playerid] = SetTimerEx("BombTimer", 3000, false, "i", playerid);
  839.     pb3DText[playerid] = Create3DTextLabel(GetName(playerid), 0xFF000088, pBombPos[playerid][0], pBombPos[playerid][1] , pBombPos[playerid][2], 30.0, 0, 0);
  840.     pbData[playerid][BombUse] = false;
  841.     pbData[playerid][Bomb]--;
  842.     pbData[playerid][BombEx] = true;
  843.     return 1;
  844. }
  845. //Timming Bomb
  846. CMD:planttbomb(playerid, params[]){
  847.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  848.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  849.     if(pbData[playerid][TBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a timing bomb");
  850.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  851.     ShowPlayerDialog(playerid, DIALOG_TBomb, DIALOG_STYLE_INPUT, "Timing Bomb","Setup the seconds of the bomb to explode", "Setup", "Cancel");
  852.     return 1;
  853. }
  854. //C4
  855. CMD:plantc4(playerid, params[]){
  856.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  857.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  858.     if(pbData[playerid][C4] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a C4");
  859.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  860.     GetPlayerPos(playerid, gC[0], gC[1], gC[2]);
  861.     pBomb[playerid] = CreateObject(1252, gC[0], gC[1], gC[2]-1, 0.0, 0.0,0.0);
  862.     pBombPos[playerid][0] = gC[0];
  863.     pBombPos[playerid][1] = gC[1];
  864.     pBombPos[playerid][2] = gC[2];
  865.     pb3DText[playerid] = Create3DTextLabel(GetName(playerid), 0xFF000088, pBombPos[playerid][0], pBombPos[playerid][1] , pBombPos[playerid][2], 30.0, 0, 0);
  866.     pbData[playerid][BombUse] = false;
  867.     pbData[playerid][C4]--;
  868.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}You can use {FFFF00}/detonate {FFFFFF}to activate the C4");
  869.     pbData[playerid][BombEx] = true;
  870.     pbData[playerid][BombC4] = true;
  871.     return 1;
  872. }
  873. CMD:detonate(playerid, params[]){
  874.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  875.     if(pbData[playerid][BombC4] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: There is no C4 to blowup");
  876.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}You have detonated the C4");
  877.     CreateExplosion(pBombPos[playerid][0],pBombPos[playerid][1], pBombPos[playerid][2], 1, 5);
  878.     pbData[playerid][BombUse] = false;
  879.     SetTimerEx("BombBrakeTimer", BrakingTimer, false, "i", playerid);
  880.     DestroyObject(pBomb[playerid]);
  881.     Delete3DTextLabel(pb3DText[playerid]);
  882.     pbData[playerid][BombC4] = false;
  883.     pbData[playerid][BombEx] = false;
  884.     return 1;
  885. }
  886. //Car bomb
  887. CMD:plantvehbomb(playerid, params[]){
  888.     new vehicleid = GetPlayerVehicleID(playerid);
  889.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  890.     if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You have to be in a vehicle to use this!");
  891.     if(pbData[playerid][CBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Car bomb");
  892.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  893.     vbData[vehicleid][CarBomb] = true;
  894.     SendClientMessage(playerid, Blren, "[EO_INFO]: You have planted a car bomb in this vehicle");
  895.     SendClientMessage(playerid, Blren, "[EO_INFO]: The car bomb will be activated if anyone attempts to drive it");
  896.     pbData[playerid][BombEx] = true;
  897.     pbData[playerid][BombUse] = false;
  898.     return 1;
  899. }
  900. //Atomic bomb
  901. CMD:setabpos(playerid, params[]){
  902.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  903.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  904.     if(pbData[playerid][ABomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have an Atomic bomb");
  905.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  906.     GetPlayerPos(playerid, gC[0], gC[1], gC[2]);
  907.     pABombPos[playerid][0] = gC[0];
  908.     pABombPos[playerid][1] = gC[1];
  909.     pABombPos[playerid][2] = gC[2]+100;
  910.     pbData[playerid][BombUse] = false;
  911.     pbData[playerid][ABomb]--;
  912.     pbData[playerid][BombEx] = true;
  913.     pbData[playerid][AtBomb] = true;
  914.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}The atomic bomb impact position has been set!");
  915.     return 1;
  916. }
  917. CMD:launchab(playerid,params[]){
  918.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  919.     if(pbData[playerid][AtBomb] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: There is no posetion set to activate the atomic bomb");
  920.     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");
  921.     pBomb[playerid] = CreateObject(3786, pABombPos[playerid][0], pABombPos[playerid][1], pABombPos[playerid][2], 0.0,-90,0.0);
  922.     MoveObject(pBomb[playerid],pABombPos[playerid][0], pABombPos[playerid][1], pABombPos[playerid][2]-100,30,0.0,-90,0.0);
  923.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}The atomic bomb has been launched");
  924.     pABICheck[playerid] = SetTimer("atomicbombimpact", 100, true);
  925.     return 1;
  926. }
  927. public atomicbombimpact(playerid){
  928.     new Float:ax,Float:ay,Float:az;
  929.     GetObjectPos(pBomb[playerid],ax, ay, az);
  930.     if(ax == pABombPos[playerid][0] && ay == pABombPos[playerid][1] && az == pABombPos[playerid][2]-100){
  931.         CreateExplosion(pABombPos[playerid][0]+10,pABombPos[playerid][1]+5, pABombPos[playerid][2]-100, 2, 500);
  932.         CreateExplosion(pABombPos[playerid][0]+3,pABombPos[playerid][1]+2, pABombPos[playerid][2]-100, 3, 200);
  933.         CreateExplosion(pABombPos[playerid][0]-10,pABombPos[playerid][1], pABombPos[playerid][2]-100, 4, 400);
  934.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]+8, pABombPos[playerid][2]-100, 1, 300);
  935.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1], pABombPos[playerid][2]-100, 2, 20);
  936.         CreateExplosion(pABombPos[playerid][0]+12,pABombPos[playerid][1]+4, pABombPos[playerid][2]-100, 2, 20);
  937.         CreateExplosion(pABombPos[playerid][0]+10,pABombPos[playerid][1]-6, pABombPos[playerid][2]-100, 2, 20);
  938.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1], pABombPos[playerid][2]-100, 13, 20);
  939.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]+2, pABombPos[playerid][2]-100, 6, 20);
  940.        
  941.         CreateExplosion(pABombPos[playerid][0]-10,pABombPos[playerid][1]-5, pABombPos[playerid][2]-100, 2, 100);
  942.         CreateExplosion(pABombPos[playerid][0]-3,pABombPos[playerid][1]-2, pABombPos[playerid][2]-100, 3, 100);
  943.         CreateExplosion(pABombPos[playerid][0]+10,pABombPos[playerid][1], pABombPos[playerid][2]-100, 4, 100);
  944.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]-8, pABombPos[playerid][2]-100, 1, 100);
  945.         CreateExplosion(pABombPos[playerid][0]+20,pABombPos[playerid][1], pABombPos[playerid][2]-100, 2, 100);
  946.         CreateExplosion(pABombPos[playerid][0]-12,pABombPos[playerid][1]-4, pABombPos[playerid][2]-100, 2, 100);
  947.         CreateExplosion(pABombPos[playerid][0]-10,pABombPos[playerid][1]+6, pABombPos[playerid][2]-100, 2, 100);
  948.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]-2, pABombPos[playerid][2]-100, 7, 100);
  949.        
  950.         CreateExplosion(pABombPos[playerid][0]-15,pABombPos[playerid][1]-15, pABombPos[playerid][2]-100, 2, 20);
  951.         CreateExplosion(pABombPos[playerid][0]-13,pABombPos[playerid][1]-20, pABombPos[playerid][2]-100, 3, 20);
  952.         CreateExplosion(pABombPos[playerid][0]+15,pABombPos[playerid][1], pABombPos[playerid][2]-100, 4, 20);
  953.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]-18, pABombPos[playerid][2]-100, 1, 20);
  954.         CreateExplosion(pABombPos[playerid][0]+18,pABombPos[playerid][1], pABombPos[playerid][2]-100, 2, 20);
  955.         CreateExplosion(pABombPos[playerid][0]-22,pABombPos[playerid][1]-24, pABombPos[playerid][2]-100, 2, 20);
  956.         CreateExplosion(pABombPos[playerid][0]-20,pABombPos[playerid][1]+16, pABombPos[playerid][2]-100, 2, 20);
  957.        
  958.         CreateExplosion(pABombPos[playerid][0]+30,pABombPos[playerid][1]+30, pABombPos[playerid][2]-100, 6, 100);
  959.         CreateExplosion(pABombPos[playerid][0]-30,pABombPos[playerid][1]+30, pABombPos[playerid][2]-100, 6, 100);
  960.         CreateExplosion(pABombPos[playerid][0]+30,pABombPos[playerid][1]+0, pABombPos[playerid][2]-100, 6, 100);
  961.         CreateExplosion(pABombPos[playerid][0]-30,pABombPos[playerid][1]+10, pABombPos[playerid][2]-100, 6, 100);
  962.         CreateExplosion(pABombPos[playerid][0]-30,pABombPos[playerid][1]-30, pABombPos[playerid][2]-100, 6, 100);
  963.         CreateExplosion(pABombPos[playerid][0]+20,pABombPos[playerid][1]-30, pABombPos[playerid][2]-100, 6, 100);
  964.        
  965.         DestroyObject(pBomb[playerid]);
  966.         for(new i=0;i<=MAX_PLAYERS;i++){
  967.             if(!IsPlayerConnected(i)) continue;
  968.             if(IsPlayerInRangeOfPoint(i,100,pABombPos[playerid][0],pABombPos[playerid][1], pABombPos[playerid][2]-100)){
  969.                 SetPlayerDrunkLevel (playerid, 5000);
  970.                 SetPlayerArmour(i,0);
  971.                 SetPlayerHealth(i,0);
  972.             }
  973.         }
  974.     }
  975.     pbData[playerid][BombUse] = false;
  976.     pbData[playerid][BombEx] = false;
  977.     pbData[playerid][AtBomb] = false;
  978. }
  979.  
  980. //Sticky Bomb
  981. CMD:attachsbomb(playerid, params[]){
  982.     new tid, str[53+MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], tname[MAX_PLAYER_NAME];
  983.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  984.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  985.     if(pbData[playerid][SBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Sticky bomb");
  986.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  987.     if(sscanf(params, "u", tid)) return SendClientMessage(playerid, Red, "[USAGE]: /attachsbomb (playerid)");
  988.     if(!IsPlayerConnected(tid) || tid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: This player is not connected");
  989.     if(tid == playerid) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You can't stick a bomb to yourself");
  990.     if(IsPlayerInAnyVehicle(tid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: That player is in a vehicle");
  991.     GetPlayerName(playerid, pname, sizeof(pname));
  992.     GetPlayerName(tid, tname, sizeof(tname));
  993.     pbData[tid][pSBomb] = true;
  994.     pSBCheck[playerid] = SetTimer("stickybombexp", 3000, false);
  995.     pbData[playerid][BombUse] = false;
  996.     pbData[playerid][SBomb]--;
  997.     pbData[playerid][BombEx] = true;
  998.     format(str, sizeof(str), "[EO_INFO]: {FFFFFF}%s Has thrown a sticky bomb on you",pname);
  999.     SendClientMessage(tid, Blren, str);
  1000.     format(str, sizeof(str), "[EO_INFO]: {FFFFFF}You have sticked a sticky bomb to %s",tname);
  1001.     SendClientMessage(playerid, Blren, str);
  1002.     return 1;
  1003. }
  1004.  
  1005. forward stickybombexp(playerid);
  1006. public stickybombexp(playerid){
  1007.     new Float:sx, Float:sy, Float:sz;
  1008.     GetPlayerPos(playerid, sx, sy, sz);
  1009.     SetPlayerArmour(playerid,0);
  1010.     SetPlayerHealth(playerid, 0);
  1011.     CreateExplosion(sx, sy, sz, 2, 10);
  1012.     pbData[playerid][BombEx] = false;
  1013.     pbData[playerid][BombUse] = false;
  1014. }
  1015.  
  1016. //Suicidal vest
  1017. CMD:mountsvb(playerid, params[]){
  1018.    
  1019.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  1020.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  1021.     if(pbData[playerid][SuBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Suicidal bomb vest");
  1022.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  1023.     SetPlayerAttachedObject(playerid, 1, 19515, 1, 0, 0.0, 0.0, 0, 0, 0, 1, 1, 1, 0xFF00FF00);
  1024.     pSVBTimer[playerid] = SetTimer("SuVBTimer", 3000, false);
  1025.     pbData[playerid][SuBomb]--;
  1026.     pbData[playerid][BombEx] = true;
  1027.     pbData[playerid][BombUse] = false;
  1028.     return 1;
  1029. }
  1030. public SuVBTimer(playerid){
  1031.     new Float:svbx, Float:svby, Float:svbz;
  1032.     GetPlayerPos(playerid, svbx, svby, svbz);
  1033.     SetPlayerArmour(playerid, 0);
  1034.     SetPlayerHealth(playerid, 0);
  1035.     CreateExplosion(svbx,svby, svbz, 2, 20);
  1036.     RemovePlayerAttachedObject(playerid, 1);
  1037.     pbData[playerid][BombEx] = false;
  1038.     pbData[playerid][BombUse] = false;
  1039. }
  1040. //Quantum bomb
  1041. CMD:setqbomb(playerid, params[]){
  1042.     new Float:pqx, Float:pqy, Float:pqz;
  1043.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  1044.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  1045.     if(pbData[playerid][QBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Quantum bomb");
  1046.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  1047.     GetPlayerPos(playerid, pqx, pqy, pqz);
  1048.     pQBCore[playerid] = CreateObject(919 ,pqx, pqy, pqz-0.5, 0.0,0.0,0.0,100);
  1049.     pQBHydraucs[playerid] = CreateObject(930, pqx+0.8, pqy, pqz-0.5, 0.0,0.0,90.0,100);
  1050.     pQBombPos[playerid][0] = pqx;
  1051.     pQBombPos[playerid][1] = pqy;
  1052.     pQBombPos[playerid][2] = pqz;
  1053.     pb3DText[playerid] = Create3DTextLabel(GetName(playerid), 0xFF000088, pQBombPos[playerid][0], pQBombPos[playerid][1] , pQBombPos[playerid][2], 30.0, 0, 0);
  1054.     pQBombATimer[playerid] = SetTimer("QuantumBombActivation", 5000, false);
  1055.     pbData[playerid][QBomb]--;
  1056.     pbData[playerid][BombUse] = false;
  1057.     pbData[playerid][BombEx] = true;
  1058.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}The Quantum bomb has been activated, the effect will start in 3 seconds");
  1059.     return 1;
  1060. }
  1061. public QuantumBombActivation(playerid){
  1062.  
  1063.     for(new i=0;i<=MAX_PLAYERS;i++){
  1064.         if(IsPlayerInRangeOfPoint(i,40, pQBombPos[playerid][0], pQBombPos[playerid][1], pQBombPos[playerid][2])){
  1065.             TogglePlayerControllable(i, false);
  1066.             SetPlayerPos(i, pQBombPos[playerid][0], pQBombPos[playerid][1], pQBombPos[playerid][2]);
  1067.             SetPlayerArmour(i, 0);
  1068.             SetPlayerHealth(i, 50);
  1069.             SendClientMessage(i, Blren, "[EO_INFO]: {FFFFFF}You have been pulled to the Quantum explosion core");
  1070.         }
  1071.     }
  1072.     CreateExplosion(pQBombPos[playerid][0],pQBombPos[playerid][1], pQBombPos[playerid][2], 2, 50);
  1073.     DestroyObject(pQBCore[playerid]);
  1074.     DestroyObject(pQBHydraucs[playerid]);
  1075.     Delete3DTextLabel(pb3DText[playerid]);
  1076.     pbData[playerid][BombUse] = false;
  1077.     pbData[playerid][BombEx] = false;
  1078.     for(new i=0;i<=MAX_PLAYERS;i++){
  1079.         if(IsPlayerInRangeOfPoint(i,40, pQBombPos[playerid][0], pQBombPos[playerid][1], pQBombPos[playerid][2])){
  1080.             TogglePlayerControllable(i, true);
  1081.             SetPlayerPos(i, pQBombPos[playerid][0]-70, pQBombPos[playerid][1]+60, pQBombPos[playerid][2]+350);
  1082.             CreateExplosion(pQBombPos[playerid][0]-70,pQBombPos[playerid][1]+60, pQBombPos[playerid][2]+350, 2, 50);
  1083.         }
  1084.     }
  1085. }
  1086.  
  1087. //Mines
  1088. CMD:plantmine(playerid, params[]){
  1089.     new Float:pmx, Float:pmy, Float:pmz;
  1090.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  1091.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  1092.     if(pbData[playerid][MBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Mine");
  1093.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  1094.     GetPlayerPos(playerid, pmx, pmy, pmz);
  1095.     pMPos[playerid][0] = pmx;
  1096.     pMPos[playerid][1] = pmy;
  1097.     pMPos[playerid][2] = pmz;
  1098.     pMObject[playerid] = CreateObject(2992,pMPos[playerid][0], pMPos[playerid][1], pMPos[playerid][2]-0.85, 0.0, 0.0, 0.0, 3);
  1099.     pb3DText[playerid] = Create3DTextLabel(GetName(playerid), 0xFF000088, pMPos[playerid][0], pMPos[playerid][1] , pMPos[playerid][2], 30.0, 0, 0);
  1100.     pAMCheck[playerid] = SetTimer("MineCheck", 50, true);
  1101.     pbData[playerid][MBomb]--;
  1102.     pbData[playerid][BombUse] = false;
  1103.     pbData[playerid][BombEx] = true;
  1104.     pbData[playerid][MBombEx] = true;
  1105.     pbData[playerid][AMBomb] = false;
  1106.     return 1;
  1107. }
  1108. CMD:activatemine(playerid,params[]){
  1109.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  1110.     if(pbData[playerid][MBombEx] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: There is no Mine to activate");
  1111.     if(pbData[playerid][AMBomb] == true) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Your Mine bomb is already activated");
  1112.     pbData[playerid][AMBomb] = true;
  1113.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}You have activated your Mine");
  1114.     return 1;
  1115. }
  1116. forward MineCheck(playerid);
  1117. public MineCheck(playerid){
  1118.     if(pbData[playerid][BombEx] == true && pbData[playerid][MBombEx] == true)
  1119.     {
  1120.         if(pbData[playerid][AMBomb] == true)
  1121.         {
  1122.             for(new i=0; i<=MAX_PLAYERS; i++)
  1123.             {
  1124.                 if(IsPlayerInRangeOfPoint(i,2,pMPos[playerid][0],pMPos[playerid][1],pMPos[playerid][2]))
  1125.                 {
  1126.                     if(!IsPlayerConnected(i)) continue;
  1127.                     SetPlayerArmour(i, 0);
  1128.                     SetPlayerArmour(i,10);
  1129.                     CreateExplosion(pMPos[playerid][0],pMPos[playerid][1], pMPos[playerid][2], 2, 30);
  1130.                     DestroyObject(pMObject[playerid]);
  1131.                     Delete3DTextLabel(pb3DText[playerid]);
  1132.                     pbData[playerid][BombUse] = false;
  1133.                     pbData[playerid][BombEx] = false;
  1134.                     pbData[playerid][MBombEx] = false;
  1135.                     pbData[playerid][AMBomb] = false;
  1136.                 }
  1137.             }
  1138.         }
  1139.     }
  1140. }
  1141. //Barrel
  1142. CMD:placeeb(playerid, params[]){
  1143.     new Float:ebx, Float:eby, Float:ebz;
  1144.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  1145.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You cannot use this while in a vehicle");
  1146.     if(pbData[playerid][EBBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have any Explosive Barrels left");
  1147.     GetPlayerPos(playerid, ebx, eby, ebz);
  1148.     CreateObject(1225, ebx+0.5, eby, ebz, 0.0, 0.0, 0.0);
  1149.     pbData[playerid][EBBomb]--;
  1150.     pbData[playerid][BombUse] = false;
  1151.     pbData[playerid][BombEx] = false;
  1152.     return 1;
  1153. }
  1154. //RC CAR
  1155. new pRCCTimer[MAX_PLAYERS];
  1156. new pRCHTimer[MAX_PLAYERS];
  1157. CMD:activaterccar(playerid, params[]){
  1158.     new Float:rccx, Float:rccy, Float:rccz,Float:opx,Float:opy,Float:opz;
  1159.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  1160.     if(pbData[playerid][RCC] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have an Explosive RC Car");
  1161.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  1162.     if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 413) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You have to be in a pony");
  1163.     GetPlayerPos(playerid, rccx, rccy, rccz);
  1164.     GetPlayerPos(playerid, opx, opy, opz);
  1165.     pRCPos[playerid][0] = opx;
  1166.     pRCPos[playerid][1] = opy;
  1167.     pRCPos[playerid][2] = opz;
  1168.     pRCC[playerid] = CreateVehicle(441, rccx+2, rccy-1, rccz-0.5, 0.0, 1,2,10000,0);
  1169.     PutPlayerInVehicle(playerid, pRCC[playerid],0);
  1170.     pRCCTimer[playerid] = SetTimer("RCCEXP",5000,false);
  1171.     pbData[playerid][RCC]--;
  1172.     pbData[playerid][BombUse] = false;
  1173.     pbData[playerid][BombEx] = true;
  1174.     return 1;
  1175. }
  1176. forward RCCEXP(playerid);
  1177. public RCCEXP(playerid){
  1178.     new Float:rccx, Float:rccy, Float:rccz;
  1179.     GetVehiclePos(pRCC[playerid], rccx, rccy, rccz);
  1180.     RemovePlayerFromVehicle(playerid);
  1181.     SetPlayerPos(playerid, pRCPos[playerid][0],pRCPos[playerid][1],pRCPos[playerid][2]);
  1182.     CreateExplosion(rccx,rccy, rccz, 2, 20);
  1183.     pbData[playerid][BombEx] = false;
  1184.     pbData[playerid][BombUse] = false;
  1185. }
  1186. //RC Heli
  1187. CMD:activatedrone(playerid, params[]){
  1188.     new Float:rccx, Float:rccy, Float:rccz,Float:opx,Float:opy,Float:opz;
  1189.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  1190.     if(pbData[playerid][RCH] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have an Explosive Drone");
  1191.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  1192.     if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 413) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You have to be in a pony");
  1193.     GetPlayerPos(playerid, rccx, rccy, rccz);
  1194.     GetPlayerPos(playerid, opx, opy, opz);
  1195.     pRCPos[playerid][0] = opx;
  1196.     pRCPos[playerid][1] = opy;
  1197.     pRCPos[playerid][2] = opz;
  1198.     pRCH[playerid] = CreateVehicle(465, rccx+2, rccy-1, rccz-0.5, 0.0, 1,2,10000,0);
  1199.     PutPlayerInVehicle(playerid, pRCH[playerid],0);
  1200.     pRCHTimer[playerid] = SetTimer("RCCEXP",5000,false);
  1201.     pbData[playerid][RCH]--;
  1202.     pbData[playerid][BombEx] = true;
  1203.     pbData[playerid][BombUse] = false;
  1204.     return 1;
  1205. }
  1206.  
  1207. forward RCHEXP(playerid);
  1208. public RCHEXP(playerid){
  1209.     new Float:drx, Float:dry, Float:drz;
  1210.     GetVehiclePos(pRCH[playerid], drx, dry, drz);
  1211.     RemovePlayerFromVehicle(playerid);
  1212.     SetPlayerPos(playerid, pRCPos[playerid][0],pRCPos[playerid][1],pRCPos[playerid][2]);
  1213.     CreateExplosion(drx,dry,drz, 2, 20);
  1214.     pbData[playerid][BombEx] = false;
  1215.     pbData[playerid][BombUse] = false;
  1216.  
  1217. }
  1218. ////////////////////////////////  TIMERS   //////////////////////////////////////
  1219.  
  1220. //Time to explode
  1221. public BombTimer(playerid){
  1222.     KillTimer(pBombTimer[playerid]);
  1223.     CreateExplosion(pBombPos[playerid][0],pBombPos[playerid][1], pBombPos[playerid][2], 1, 5);
  1224.     pbData[playerid][BombUse] = false;
  1225.     SetTimerEx("BombBrakeTimer", BrakingTimer, false, "i", playerid);
  1226.     DestroyObject(pBomb[playerid]);
  1227.     Delete3DTextLabel(pb3DText[playerid]);
  1228.     pbData[playerid][BombEx] = false;
  1229. }
  1230. //Timed bomb exploding timer
  1231. public TimingBombTimer(playerid){
  1232.     if(pbData[playerid][BombEx] == true){
  1233.         KillTimer(pBombTimer[playerid]);
  1234.         CreateExplosion(pBombPos[playerid][0],pBombPos[playerid][1], pBombPos[playerid][2], 1, 5);
  1235.         pbData[playerid][BombEx] = false;
  1236.         DestroyObject(pBomb[playerid]);
  1237.         Delete3DTextLabel(pb3DText[playerid]);
  1238.     }
  1239. }
  1240. //Car bomb clearing
  1241. public VehicleCarBombClear(vehicleid){
  1242.     new str[75],Count=0;
  1243.     for(new i=0; i<=MAX_VEHICLES;i++){
  1244.         if(vbData[i][CarBomb] == true) return Count++;
  1245.         vbData[i][CarBomb] = false;
  1246.     }
  1247.     format(str,sizeof(str), "[EO_INFO]: {FFFFFF}All vehicle bombs were cleared, {FFFF00}(total: %i)",Count);
  1248.     SendClientMessageToAll(Blren, str);
  1249.     return 1;
  1250. }
  1251. /////////////////////////// Brake Timer    ///////////////////////////////////
  1252. forward BombBrakeTimer(playerid);
  1253. public BombBrakeTimer(playerid){
  1254.     pbData[playerid][BombUse] = true;
  1255. }
  1256.  
  1257.  
  1258. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1259. {
  1260.     new Float:x, Float:y, Float:z;
  1261.     if(vbData[vehicleid][CarBomb] == true){
  1262.         GetVehiclePos(vehicleid, x, y, z);
  1263.         SetVehicleHealth(vehicleid, 0);
  1264.         CreateExplosion(x,y, z, 2, 10);
  1265.         pbData[playerid][BombEx] = false;
  1266.         vbData[vehicleid][BombUse] = false;
  1267.         vbData[vehicleid][CarBomb] = false;
  1268.     }
  1269.     return 1;
  1270. }
  1271.  
  1272. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1273. {
  1274.     new query[55],DBResult:Result;
  1275.     if(newkeys ==  KEY_NO){
  1276.         for(new i=0;i<MAX_EVM;i++){
  1277.             format(query, sizeof(query), "SELECT * FROM `EVM` WHERE ID = %d",i);
  1278.             Result = db_query(Database, query);
  1279.             if(IsPlayerInRangeOfPoint(playerid, 2, EVMData[i][PosX],EVMData[i][PosY],EVMData[i][PosZ]) && db_num_rows(Result)){
  1280.                 if(EVMData[i][EVMBlocked] == 0){
  1281.                     ShowPlayerDialog(playerid, DIALOG_EVMINDEX, DIALOG_STYLE_LIST, "EO_Explosive Shop",
  1282.                     "Bomb\n\
  1283.                     Timing bomb\n\
  1284.                     C4\n\
  1285.                     Car bomb\n\
  1286.                     Atomic bomb\n\
  1287.                     Sticky bombs\n\
  1288.                     Suicidal bomb vest\n\
  1289.                     Quantum bomb\n\
  1290.                     Mines\n\
  1291.                     Explosive barrels\n\
  1292.                     Explosive RC Car\n\
  1293.                     Explosive Drone"
  1294.                     ,"Select", "Cancel");
  1295.                     return 1;
  1296.                 }
  1297.                 else
  1298.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: This EVM is currently blocked by an administrator and can't be used");
  1299.             }
  1300.             db_free_result(Result);
  1301.         }
  1302.     }
  1303.     return 1;
  1304. }
  1305.  
  1306. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1307. {
  1308.     if(dialogid == DIALOG_EVMINDEX){
  1309.         if(!response) return 0;
  1310.         switch(listitem){
  1311.             case 0:{
  1312.                 if(GetPlayerMoney(playerid) >= BombP){
  1313.                     new string[120];
  1314.                     pbData[playerid][Bomb]++;
  1315.                     GivePlayerMoney(playerid, -TBombP);
  1316.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Bomb for $%i, the use instructions via /ehelp",BombP);
  1317.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1318.                 }
  1319.                 else
  1320.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1321.             }
  1322.             case 1:{
  1323.                 if(GetPlayerMoney(playerid) >= TBombP){
  1324.                     new string[120];
  1325.                     pbData[playerid][TBomb]++;
  1326.                     GivePlayerMoney(playerid, -TBombP);
  1327.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Timing Bomb for $%i, the use instructions via /ehelp",TBombP);
  1328.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1329.                 }
  1330.                 else
  1331.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1332.             }
  1333.             case 2:{
  1334.                 if(GetPlayerMoney(playerid) >= C4P){
  1335.                     new string[120];
  1336.                     pbData[playerid][C4]++;
  1337.                     GivePlayerMoney(playerid, -C4P);
  1338.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a C4 for $%i, the use instructions via /ehelp",C4P);
  1339.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1340.                 }
  1341.                 else
  1342.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1343.             }
  1344.             case 3:{
  1345.                 if(GetPlayerMoney(playerid) >= CBombP){
  1346.                     new string[120];
  1347.                     pbData[playerid][CBomb]++;
  1348.                     GivePlayerMoney(playerid, -CBombP);
  1349.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Car Bomb for $%i, the use instructions via /ehelp",CBombP);
  1350.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1351.                 }
  1352.                 else
  1353.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1354.             }
  1355.             case 4:{
  1356.                 if(GetPlayerMoney(playerid) >= ABombP){
  1357.                     new string[120];
  1358.                     pbData[playerid][ABomb]++;
  1359.                     GivePlayerMoney(playerid, -ABombP);
  1360.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought an Atomic Bomb for $%i, the use instructions via /ehelp",ABombP);
  1361.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1362.                 }
  1363.                 else
  1364.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1365.             }
  1366.             case 5:{
  1367.                 if(GetPlayerMoney(playerid) >= SBombP){
  1368.                     new string[120];
  1369.                     pbData[playerid][SBomb]++;
  1370.                     GivePlayerMoney(playerid, -SBombP);
  1371.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Sticky Bomb for $%i, the use instructions via /ehelp",SBombP);
  1372.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1373.                 }
  1374.                 else
  1375.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1376.             }
  1377.             case 6:{
  1378.                 if(GetPlayerMoney(playerid) >= SuBombP){
  1379.                     new string[120];
  1380.                     pbData[playerid][SuBomb]++;
  1381.                     GivePlayerMoney(playerid, -SuBombP);
  1382.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Suicidal Bomb vest for $%i, the use instructions via /ehelp",SuBombP);
  1383.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1384.                 }
  1385.                 else
  1386.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1387.             }
  1388.             case 7:{
  1389.                 if(GetPlayerMoney(playerid) >= QBombP){
  1390.                     new string[120];
  1391.                     pbData[playerid][QBomb]++;
  1392.                     GivePlayerMoney(playerid, -QBombP);
  1393.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Quantum bomb for $%i, the use instructions via /ehelp",QBombP);
  1394.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1395.                 }
  1396.                 else
  1397.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1398.             }
  1399.             case 8:{
  1400.                 if(GetPlayerMoney(playerid) >= MBombP){
  1401.                     new string[120];
  1402.                     pbData[playerid][MBomb]++;
  1403.                     GivePlayerMoney(playerid, -MBombP);
  1404.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Mine for $%i, the use instructions via /ehelp",MBombP);
  1405.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1406.                 }
  1407.                 else
  1408.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1409.             }
  1410.             case 9:{
  1411.                 if(GetPlayerMoney(playerid) >= EBarrelP){
  1412.                     new string[120];
  1413.                     pbData[playerid][EBBomb]++;
  1414.                     GivePlayerMoney(playerid, -EBarrelP);
  1415.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought an explosive barrel for $%i, the use instructions via /ehelp",EBarrelP);
  1416.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1417.                 }
  1418.                 else
  1419.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1420.             }
  1421.             case 10:{
  1422.                 if(GetPlayerMoney(playerid) >= ERCCP){
  1423.                     new string[120];
  1424.                     pbData[playerid][RCC]++;
  1425.                     GivePlayerMoney(playerid, -ERCCP);
  1426.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought an Explosive RC Car for $%i, the use instructions via /ehelp",ERCCP);
  1427.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1428.                 }
  1429.                 else
  1430.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1431.             }
  1432.             case 11:{
  1433.                 if(GetPlayerMoney(playerid) >= ERCHP){
  1434.                     new string[120];
  1435.                     pbData[playerid][RCH]++;
  1436.                     GivePlayerMoney(playerid, -ERCHP);
  1437.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought an Explosive Drone for $%i, the use instructions via /ehelp",ERCHP);
  1438.                     SendClientMessage(playerid, 0xFFFF0088, string);
  1439.                 }
  1440.                 else
  1441.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  1442.             }
  1443.         }
  1444.     }
  1445.     if(dialogid == DIALOG_TBomb){
  1446.         if(strval(inputtext)>60 || strval(inputtext)<3) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The seconds value must be closed between 3 and 60");
  1447.         pBombTimer[playerid] = SetTimerEx("TimingBombTimer",strval(inputtext)*1000, false, "i", playerid);
  1448.         GetPlayerPos(playerid, gC[0], gC[1], gC[2]);
  1449.         pBombPos[playerid][0] = gC[0];
  1450.         pBombPos[playerid][1] = gC[1];
  1451.         pBombPos[playerid][2] = gC[2];
  1452.         pBomb[playerid] = CreateObject(1252, gC[0], gC[1], gC[2], 0.0, 0.0,0.0);
  1453.         pb3DText[playerid] = Create3DTextLabel(GetName(playerid), 0xFF000088, gC[0], gC[1] , gC[2], 30.0, 0, 0);
  1454.         pbData[playerid][TBomb]--;
  1455.         pbData[playerid][BombUse] = false;
  1456.         pbData[playerid][BombEx] = true;
  1457.     }
  1458.     return 0;
  1459. }
  1460.  
  1461. //Trials commands
  1462. CMD:veh(playerid, params[]){
  1463.     new Float:x,Float:y,Float:z;
  1464.     GetPlayerPos(playerid, x, y, z);
  1465.     CreateVehicle(411,x+1,y,z,0.0,1,1,100,0);
  1466.     return 1;
  1467. }
  1468. CMD:pony(playerid, params[]){
  1469.     new Float:x,Float:y,Float:z;
  1470.     GetPlayerPos(playerid, x, y, z);
  1471.     CreateVehicle(413,x+1,y,z,0.0,1,1,100,0);
  1472.     return 1;
  1473. }
  1474. CMD:kill(playerid, params[]){
  1475.     SetPlayerHealth(playerid, 0);
  1476.     return 1;
  1477. }
  1478. CMD:pass(playerid, params[]){
  1479.     pbData[playerid][BombUse] = true;
  1480.     return 1;
  1481. }
  1482. CMD:money(playerid, params[]){
  1483.     GivePlayerMoney(playerid, 100000);
  1484.     return 1;
  1485. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement