EOussama

EO_Explosives Shop version 0.8

Dec 2nd, 2016
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 37.27 KB | None | 0 0
  1. /*
  2.  
  3.  
  4.                                                                     _____________    _____________
  5.                                                                     ||___________   | ____________|
  6.                                                                     ||              ||           ||
  7.                                                                     ||              ||           ||
  8.                                                                     ||___________   ||           ||
  9.                                                                     ||___________   ||           ||
  10.                                                                     ||              ||           ||
  11.                                                                     ||              ||           ||
  12.                                                                     ||___________   ||___________||
  13.                                                                     ||___________   ||____________|
  14.  
  15.  
  16.                                                                             EO_Explosives Shop
  17.  
  18.  
  19.  
  20.  
  21.  
  22. **CopyRight Claim: Please do not upload this or edit it without my permission, as it still on the developement stage,
  23.  
  24.  
  25. =====================================================================================================================================================================
  26. =====================================================================================================================================================================
  27. ====================================================================================================================================================================*/
  28. #define FILTERSCRIPT
  29.  
  30. #include <a_samp>
  31. #include <sscanf2>
  32. #include <ZCMD>
  33. #include <YSI\y_ini>
  34.  
  35.  
  36. //Colors
  37. #define Blren 0x058E6AFF
  38. #define Red 0xFF0000FF
  39.  
  40.  
  41. #if defined FILTERSCRIPT
  42.  
  43. public OnFilterScriptInit()
  44. {
  45.     print("\n--------------------------------------");
  46.     print("        EO_Explosives Shop v0.8         ");
  47.     print("--------------------------------------\n");
  48.     return 1;
  49. }
  50.  
  51. public OnFilterScriptExit()
  52. {
  53.     return 1;
  54. }
  55.  
  56. #else
  57.  
  58. main()
  59. {
  60.     print("\n----------------------------------");
  61.     print("   EO_Explosives Shop  by E.Oussama ");
  62.     print("----------------------------------\n");
  63. }
  64.  
  65. #endif
  66.  
  67. new Float:gC[3];
  68.  
  69. new pBomb[MAX_PLAYERS];
  70. new pQBHydraucs[MAX_PLAYERS];
  71. new pQBCore[MAX_PLAYERS];
  72. new pBombTimer[MAX_PLAYERS];
  73. new pABICheck[MAX_PLAYERS];
  74. new pSBCheck[MAX_PLAYERS];
  75. new Float:pBombPos[MAX_PLAYERS][3];
  76. new Float:pABombPos[MAX_PLAYERS][3];
  77. new Float:pQBombPos[MAX_PLAYERS][3];
  78. new pSVBTimer[MAX_PLAYERS];
  79. new pQBombATimer[MAX_PLAYERS];
  80. new Float:pMPos[MAX_PLAYERS][3];
  81. new pMObject[MAX_PLAYERS];
  82. new pAMCheck[MAX_PLAYERS];
  83.  
  84.  
  85.  
  86.  
  87. //DIALOGS
  88. enum{
  89.     DIALOG_EVMINDEX,
  90.     DIALOG_EVMPSTATS,
  91.     DIALOG_EHELP,
  92.     DIALOG_TBomb
  93. };
  94.  
  95. enum E_PLAYER_BOMB_DATA{
  96.     bool:BombUse,
  97.     bool:BombEx,
  98.     bool:BombC4,
  99.     bool:AtBomb,
  100.     bool:CarBomb,
  101.     bool:MBombEx,
  102.     bool:AMBomb,
  103.     bool:pSBomb,
  104.     Bomb,
  105.     SuBomb,
  106.     QBomb,
  107.     EBBomb,
  108.     TBomb,
  109.     MBomb,
  110.     CBomb,
  111.     ABomb,
  112.     SBomb,
  113.     C4
  114. };
  115. new pbData[MAX_PLAYERS][E_PLAYER_BOMB_DATA];
  116. new vbData[MAX_VEHICLES][E_PLAYER_BOMB_DATA];
  117.  
  118. //TIMERS
  119. forward BombTimer(playerid);
  120. forward TimingBombTimer(playerid);
  121. forward VehicleCarBombClear(vehicleid);
  122. forward CarBombActivation(vehicleid);
  123. forward atomicbombimpact(playerid);
  124. forward SuVBTimer(playerid);
  125. forward QuantumBombActivation(playerid);
  126. /*=====================================================================================================================================================================
  127. =====================================================================================================================================================================
  128. ======================================================|| Configuration Panel ||=======================================================================================*/
  129. //Bombs Prices
  130. #define BombP 2500      // Normal bomb
  131. #define TBombP 5000     //Settable timed bomb
  132. #define C4P 10000       //C4 remote-controlled
  133. #define CBombP 12000    //Vehicle bomb
  134. #define ABombP 20000    //Atomic Bomb
  135. #define SBombP 9000     //Stiky bomb
  136. #define SuBombP 6000    //Suicidal bomb
  137. #define QBombP 30000    //quantum  bomb
  138. #define MBombP 15000    //Mines
  139. #define EBarrelP 3500   //Explosive barrel
  140. #define FireworksP 6000 //Fireworks
  141. //Timers
  142. #define BrakingTimer 300000 //Timer between using each bomb
  143. #define VehicleBombClearTimer 300000 //Time to clear all vehicle car bombs
  144. /*=====================================================================================================================================================================
  145. ====================================================================================================================================================================*/
  146.  
  147. public OnGameModeInit()
  148. {
  149.     SetGameModeText("EO_Explosives Shop v0.8");
  150.     AddPlayerClass(0, 1173.1952,-1324.2224,15.3951, 269.1425, 0, 0, 0, 0, 0, 0);
  151.  
  152.     SetTimer("VehicleCarBombClear",VehicleBombClearTimer,true);
  153.     return 1;
  154. }
  155.  
  156. public OnGameModeExit()
  157. {
  158.     SetGameModeText("EO_Explosives Shop v0.8");
  159.     AddPlayerClass(0, 1173.1952,-1324.2224,15.3951, 269.1425, 0, 0, 0, 0, 0, 0);
  160.     return 1;
  161. }
  162.  
  163. public OnPlayerRequestClass(playerid, classid)
  164. {
  165.     SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  166.     SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  167.     SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  168.     pbData[playerid][BombEx] = false;
  169.     pbData[playerid][BombC4] = false;
  170.     pbData[playerid][AtBomb] = false;
  171.     pbData[playerid][MBombEx] = false;
  172.     pbData[playerid][pSBomb] = false;
  173.     pbData[playerid][AMBomb] = false;
  174.     return 1;
  175. }
  176.  
  177. public OnPlayerConnect(playerid)
  178. {
  179.     pbData[playerid][Bomb] = 0;
  180.     pbData[playerid][BombEx] = false;
  181.     pbData[playerid][AtBomb] = false;
  182.     pbData[playerid][BombUse] = true;
  183.     pbData[playerid][BombC4] = false;
  184.     pbData[playerid][pSBomb] = false;
  185.     pbData[playerid][MBombEx] = false;
  186.     pbData[playerid][AMBomb] = false;
  187.     return 1;
  188. }
  189.  
  190. public OnPlayerDisconnect(playerid, reason)
  191. {
  192.     pbData[playerid][BombEx] = false;
  193.     pbData[playerid][BombC4] = false;
  194.     pbData[playerid][pSBomb] = false;
  195.     pbData[playerid][AtBomb] = false;
  196.     pbData[playerid][AMBomb] = false;
  197.     pbData[playerid][MBombEx] = false;
  198.     pbData[playerid][Bomb] = 0;
  199.     return 1;
  200. }
  201.  
  202. public OnPlayerSpawn(playerid)
  203. {
  204.     pbData[playerid][BombEx] = false;
  205.     pbData[playerid][BombC4] = false;
  206.     pbData[playerid][AtBomb] = false;
  207.     pbData[playerid][pSBomb] = false;
  208.     pbData[playerid][MBombEx] = false;
  209.     TogglePlayerControllable(playerid, true);
  210.     pbData[playerid][Bomb] = 0;
  211.     return 1;
  212. }
  213.  
  214. public OnPlayerDeath(playerid, killerid, reason)
  215. {
  216.     if(pbData[playerid][BombEx] == true){
  217.         SendClientMessage(playerid, Red, "[EO_INFO]: {FFFFFF}The Bomb you planted has been deactivated");
  218.     }
  219.     pbData[playerid][BombEx] = false;
  220.     pbData[playerid][BombC4] = false;
  221.     pbData[playerid][AtBomb] = false;
  222.     pbData[playerid][pSBomb] = false;
  223.     pbData[playerid][AMBomb] = false;
  224.     pbData[playerid][MBombEx] = false;
  225.     pbData[playerid][Bomb] = 0;
  226.     DestroyObject(pBomb[playerid]);
  227.     return 1;
  228. }
  229.  
  230. public OnVehicleSpawn(vehicleid)
  231. {
  232.     return 1;
  233. }
  234.  
  235. public OnVehicleDeath(vehicleid, killerid)
  236. {
  237.     return 1;
  238. }
  239.  
  240. public OnPlayerText(playerid, text[])
  241. {
  242.     return 1;
  243. }
  244.  
  245. CMD:makeevm(playerid, params[]){
  246.     new Float:x, Float:y, Float:z, Float:r;
  247.     GetPlayerFacingAngle(playerid, r);
  248.     GetPlayerPos(playerid, x, y, z);
  249.     if(IsPlayerAdmin(playerid)){
  250.         if(!IsPlayerInAnyVehicle(playerid)){
  251.             CreateObject(18885, x+1, y, z, 0.0, 0.0, -r);
  252.             SendClientMessage(playerid, 0xFFFF00, "[EO_EVM]: {FFFFFF}Explosives Vending Machine successfully created!");
  253.             return 1;
  254.         }
  255.         else{
  256.             SendClientMessage(playerid, 0xFF0000, "[ERROR]: You can't use this while in a vehicle");
  257.         }
  258.     }
  259.     else{
  260.         SendClientMessage(playerid, 0xFF0000AA, "[ERROR]: You can't use this command");
  261.     }
  262.     return 1;
  263. }
  264.  
  265.  
  266.  
  267. //explosives stats
  268. CMD:estats(playerid, params[]){
  269.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  270.     new pname[MAX_PLAYER_NAME], str[250];
  271.     GetPlayerName(playerid, pname, sizeof(pname));
  272.     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",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]);
  273.     ShowPlayerDialog(playerid, DIALOG_EVMPSTATS, DIALOG_STYLE_MSGBOX, "EO_Explosive Stats", str, "Got it!", "");
  274.     return 1;
  275. }
  276. //Explosives help index
  277. CMD:ehelp(playerid, params[]){
  278.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  279.     new str[2500];
  280.     strcat(str,"{FFFF00}Bomb: {FFFFFF}A 3 seconds timed bomb with a normal exploding radius, it can be used via /plantbomb\n");
  281.     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");
  282.     strcat(str,"{FFFF00}C4: {FFFFFF}A Remote-controlled bomb, which can be setup somewhere using /plantc4 then detonated via /detonate\n");
  283.     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");
  284.     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");
  285.     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");
  286.     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");
  287.     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");
  288.     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");
  289.     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");
  290.     ShowPlayerDialog(playerid, DIALOG_EHELP, DIALOG_STYLE_MSGBOX, "EO_Explosives Help Section", str, "Got it","");
  291.     return 1;
  292. }
  293.  
  294.  
  295.  
  296.  
  297. CMD:evmshop(playerid, params[]){
  298.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  299.     ShowPlayerDialog(playerid, DIALOG_EVMINDEX, DIALOG_STYLE_LIST, "EO_Explosive Shop",
  300.     "Bomb\n\
  301.     Timing bomb\n\
  302.     C4\n\
  303.     Car bomb\n\
  304.     Atomic bomb\n\
  305.    Sticky bombs\n\
  306.    Suicidal bomb vest\n\
  307.    Quantum bomb\n\
  308.    Mines\n\
  309.    Explosive barrels"
  310.     ,"Select", "Cancel");
  311.     return 1;
  312. }
  313.  
  314.  
  315. //////////////////////////   BOMBS    ////////////////////////////////////////
  316.  
  317. //Bomb
  318. CMD:plantbomb(playerid, params[]){
  319.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  320.     if(pbData[playerid][Bomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a bomb");
  321.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  322.     GetPlayerPos(playerid, gC[0], gC[1], gC[2]);
  323.     pBomb[playerid] = CreateObject(1252, gC[0], gC[1], gC[2], 0.0, 0.0,0.0);
  324.     pBombPos[playerid][0] = gC[0];
  325.     pBombPos[playerid][1] = gC[1];
  326.     pBombPos[playerid][2] = gC[2];
  327.     pBombTimer[playerid] = SetTimerEx("BombTimer", 3000, false, "i", playerid);
  328.     pbData[playerid][BombUse] = false;
  329.     pbData[playerid][Bomb]--;
  330.     pbData[playerid][BombEx] = true;
  331.     return 1;
  332. }
  333. //Timming Bomb
  334. CMD:planttbomb(playerid, params[]){
  335.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  336.     if(pbData[playerid][TBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a timing bomb");
  337.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  338.     ShowPlayerDialog(playerid, DIALOG_TBomb, DIALOG_STYLE_INPUT, "Timing Bomb","Setup the seconds of the bomb to explode", "Setup", "Cancel");
  339.     return 1;
  340. }
  341. //C4
  342. CMD:plantc4(playerid, params[]){
  343.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  344.     if(pbData[playerid][C4] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a C4");
  345.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  346.     GetPlayerPos(playerid, gC[0], gC[1], gC[2]);
  347.     pBomb[playerid] = CreateObject(1252, gC[0], gC[1], gC[2]-1, 0.0, 0.0,0.0);
  348.     pBombPos[playerid][0] = gC[0];
  349.     pBombPos[playerid][1] = gC[1];
  350.     pBombPos[playerid][2] = gC[2];
  351.     pbData[playerid][BombUse] = false;
  352.     pbData[playerid][C4]--;
  353.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}You can use {FFFF00}/detonate {FFFFFF}to activate the C4");
  354.     pbData[playerid][BombEx] = true;
  355.     pbData[playerid][BombC4] = true;
  356.     return 1;
  357. }
  358. CMD:detonate(playerid, params[]){
  359.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  360.     if(pbData[playerid][BombC4] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: There is no C4 to blowup");
  361.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}You have detonated the C4");
  362.     CreateExplosion(pBombPos[playerid][0],pBombPos[playerid][1], pBombPos[playerid][2], 1, 5);
  363.     pbData[playerid][BombUse] = false;
  364.     SetTimerEx("BombBrakeTimer", BrakingTimer, false, "i", playerid);
  365.     DestroyObject(pBomb[playerid]);
  366.     pbData[playerid][BombC4] = false;
  367.     pbData[playerid][BombEx] = false;
  368.     return 1;
  369. }
  370. //Car bomb
  371. CMD:plantvehbomb(playerid, params[]){
  372.     new vehicleid = GetPlayerVehicleID(playerid);
  373.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  374.     if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You have to be in a vehicle to use this!");
  375.     if(pbData[playerid][CBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Car bomb");
  376.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  377.     vbData[vehicleid][CarBomb] = true;
  378.     SendClientMessage(playerid, Blren, "[EO_INFO]: You have planted a car bomb in this vehicle");
  379.     SendClientMessage(playerid, Blren, "[EO_INFO]: The car bomb will be activated if anyone attempts to drive it");
  380.     pbData[playerid][BombEx] = true;
  381.     pbData[playerid][BombUse] = false;
  382.     return 1;
  383. }
  384. //Atomic bomb
  385. CMD:setabpos(playerid, params[]){
  386.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  387.     if(pbData[playerid][ABomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have an Atomic bomb");
  388.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  389.     GetPlayerPos(playerid, gC[0], gC[1], gC[2]);
  390.     pABombPos[playerid][0] = gC[0];
  391.     pABombPos[playerid][1] = gC[1];
  392.     pABombPos[playerid][2] = gC[2]+100;
  393.     pbData[playerid][BombUse] = false;
  394.     pbData[playerid][ABomb]--;
  395.     pbData[playerid][BombEx] = true;
  396.     pbData[playerid][AtBomb] = true;
  397.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}The atomic bomb impact position has been set!");
  398.     return 1;
  399. }
  400. CMD:launchab(playerid,params[]){
  401.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  402.     if(pbData[playerid][AtBomb] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: There is no posetion set to activate the atomic bomb");
  403.     if(IsPlayerInAnyVehicle(playerid)){
  404.         if(GetVehicleModel(GetPlayerVehicleID(playerid) == 413 || GetPlayerVehicleID(playerid) == 482)){
  405.             pBomb[playerid] = CreateObject(3786, pABombPos[playerid][0], pABombPos[playerid][1], pABombPos[playerid][2], 0.0,-90,0.0);
  406.             MoveObject(pBomb[playerid],pABombPos[playerid][0], pABombPos[playerid][1], pABombPos[playerid][2]-100,30,0.0,-90,0.0);
  407.             SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}The atomic bomb has been launched");
  408.             pABICheck[playerid] = SetTimer("atomicbombimpact", 100, true);
  409.         }
  410.         else{
  411.             SendClientMessage(playerid, 0xFF000088, "[ERROR]: You have to be in a Pony or a Burrito to launch the Atomic Bomb");
  412.         }
  413.     }
  414.     else{
  415.             SendClientMessage(playerid, 0xFF000088, "[ERROR]: You have to be in a Pony or a Burrito to launch the Atomic Bomb");
  416.     }
  417.     return 1;
  418. }
  419. public atomicbombimpact(playerid){
  420.     new Float:ax,Float:ay,Float:az;
  421.     GetObjectPos(pBomb[playerid],ax, ay, az);
  422.     if(ax == pABombPos[playerid][0] && ay == pABombPos[playerid][1] && az == pABombPos[playerid][2]-100){
  423.         CreateExplosion(pABombPos[playerid][0]+10,pABombPos[playerid][1]+5, pABombPos[playerid][2]-100, 2, 20);
  424.         CreateExplosion(pABombPos[playerid][0]+3,pABombPos[playerid][1]+2, pABombPos[playerid][2]-100, 3, 20);
  425.         CreateExplosion(pABombPos[playerid][0]-10,pABombPos[playerid][1], pABombPos[playerid][2]-100, 4, 20);
  426.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]+8, pABombPos[playerid][2]-100, 1, 20);
  427.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1], pABombPos[playerid][2]-100, 2, 20);
  428.         CreateExplosion(pABombPos[playerid][0]+12,pABombPos[playerid][1]+4, pABombPos[playerid][2]-100, 2, 20);
  429.         CreateExplosion(pABombPos[playerid][0]+10,pABombPos[playerid][1]-6, pABombPos[playerid][2]-100, 2, 20);
  430.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1], pABombPos[playerid][2]-100, 13, 20);
  431.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]+2, pABombPos[playerid][2]-100, 6, 20);
  432.        
  433.         CreateExplosion(pABombPos[playerid][0]-10,pABombPos[playerid][1]-5, pABombPos[playerid][2]-100, 2, 100);
  434.         CreateExplosion(pABombPos[playerid][0]-3,pABombPos[playerid][1]-2, pABombPos[playerid][2]-100, 3, 100);
  435.         CreateExplosion(pABombPos[playerid][0]+10,pABombPos[playerid][1], pABombPos[playerid][2]-100, 4, 100);
  436.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]-8, pABombPos[playerid][2]-100, 1, 100);
  437.         CreateExplosion(pABombPos[playerid][0]+20,pABombPos[playerid][1], pABombPos[playerid][2]-100, 2, 100);
  438.         CreateExplosion(pABombPos[playerid][0]-12,pABombPos[playerid][1]-4, pABombPos[playerid][2]-100, 2, 100);
  439.         CreateExplosion(pABombPos[playerid][0]-10,pABombPos[playerid][1]+6, pABombPos[playerid][2]-100, 2, 100);
  440.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]-2, pABombPos[playerid][2]-100, 7, 100);
  441.        
  442.         CreateExplosion(pABombPos[playerid][0]-15,pABombPos[playerid][1]-15, pABombPos[playerid][2]-100, 2, 20);
  443.         CreateExplosion(pABombPos[playerid][0]-13,pABombPos[playerid][1]-20, pABombPos[playerid][2]-100, 3, 20);
  444.         CreateExplosion(pABombPos[playerid][0]+15,pABombPos[playerid][1], pABombPos[playerid][2]-100, 4, 20);
  445.         CreateExplosion(pABombPos[playerid][0],pABombPos[playerid][1]-18, pABombPos[playerid][2]-100, 1, 20);
  446.         CreateExplosion(pABombPos[playerid][0]+18,pABombPos[playerid][1], pABombPos[playerid][2]-100, 2, 20);
  447.         CreateExplosion(pABombPos[playerid][0]-22,pABombPos[playerid][1]-24, pABombPos[playerid][2]-100, 2, 20);
  448.         CreateExplosion(pABombPos[playerid][0]-20,pABombPos[playerid][1]+16, pABombPos[playerid][2]-100, 2, 20);
  449.        
  450.         CreateExplosion(pABombPos[playerid][0]+30,pABombPos[playerid][1]+30, pABombPos[playerid][2]-100, 6, 100);
  451.         CreateExplosion(pABombPos[playerid][0]-30,pABombPos[playerid][1]+30, pABombPos[playerid][2]-100, 6, 100);
  452.         CreateExplosion(pABombPos[playerid][0]+30,pABombPos[playerid][1]+0, pABombPos[playerid][2]-100, 6, 100);
  453.         CreateExplosion(pABombPos[playerid][0]-30,pABombPos[playerid][1]+10, pABombPos[playerid][2]-100, 6, 100);
  454.         CreateExplosion(pABombPos[playerid][0]-30,pABombPos[playerid][1]-30, pABombPos[playerid][2]-100, 6, 100);
  455.         CreateExplosion(pABombPos[playerid][0]+20,pABombPos[playerid][1]-30, pABombPos[playerid][2]-100, 6, 100);
  456.        
  457.         DestroyObject(pBomb[playerid]);
  458.         for(new i=0;i<=MAX_PLAYERS;i++){
  459.             if(!IsPlayerConnected(i)) continue;
  460.             if(IsPlayerInRangeOfPoint(i,100,pABombPos[playerid][0],pABombPos[playerid][1], pABombPos[playerid][2]-100)){
  461.                 SetPlayerDrunkLevel (playerid, 5000);
  462.                 SetPlayerArmour(i,0);
  463.                 SetPlayerHealth(i,0);
  464.             }
  465.         }
  466.     }
  467.     pbData[playerid][BombUse] = false;
  468.     pbData[playerid][BombEx] = false;
  469.     pbData[playerid][AtBomb] = false;
  470. }
  471.  
  472. //Sticky Bomb
  473. CMD:attachsbomb(playerid, params[]){
  474.     new tid, str[40+MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], tname[MAX_PLAYER_NAME];
  475.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  476.     if(pbData[playerid][SBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Sticky bomb");
  477.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  478.     if(sscanf(params, "u", tid)) return SendClientMessage(playerid, 0xFFFFFF, "[USAGE]: /attachsbomb (playerid)");
  479.     if(!IsPlayerConnected(tid) || tid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: This player is not connected");
  480.     if(tid == playerid) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You can't stick a bomb to yourself");
  481.     GetPlayerName(playerid, pname, sizeof(pname));
  482.     GetPlayerName(tid, tname, sizeof(tname));
  483.     pbData[tid][pSBomb] = true;
  484.     pSBCheck[playerid] = SetTimer("stickybombexp", 3000, false);
  485.     pbData[playerid][BombUse] = false;
  486.     pbData[playerid][SBomb]--;
  487.     pbData[playerid][BombEx] = true;
  488.     format(str, sizeof(str), "[EO_INFO]: {FFFFFF}%s Has thrown a sticky bomb on you",pname);
  489.     SendClientMessage(tid, Blren, str);
  490.     format(str, sizeof(str), "[EO_INFO]: {FFFFFF}You have sticked a sticky bomb to %s",tname);
  491.     SendClientMessage(playerid, Blren, str);
  492.     return 1;
  493. }
  494.  
  495. forward stickybombexp(playerid);
  496. public stickybombexp(playerid){
  497.     new Float:sx, Float:sy, Float:sz;
  498.     GetPlayerPos(playerid, sx, sy, sz);
  499.     SetPlayerArmour(playerid,0);
  500.     SetPlayerHealth(playerid, 0);
  501.     CreateExplosion(sx, sy, sz, 2, 10);
  502.     pbData[playerid][BombEx] = false;
  503.     pbData[playerid][BombUse] = false;
  504. }
  505.  
  506. //Suicidal vest
  507. CMD:mountsvb(playerid, params[]){
  508.    
  509.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  510.     if(pbData[playerid][SuBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Suicidal bomb vest");
  511.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  512.     SetPlayerAttachedObject(playerid, 1, 19515, 1, 0, 0.0, 0.0, 0, 0, 0, 1, 1, 1, 0xFF00FF00);
  513.     pSVBTimer[playerid] = SetTimer("SuVBTimer", 3000, false);
  514.     pbData[playerid][SuBomb]--;
  515.     pbData[playerid][BombEx] = true;
  516.     pbData[playerid][BombUse] = false;
  517.     return 1;
  518. }
  519. public SuVBTimer(playerid){
  520.     new Float:svbx, Float:svby, Float:svbz;
  521.     GetPlayerPos(playerid, svbx, svby, svbz);
  522.     SetPlayerArmour(playerid, 0);
  523.     SetPlayerHealth(playerid, 0);
  524.     CreateExplosion(svbx,svby, svbz, 2, 20);
  525.     RemovePlayerAttachedObject(playerid, 1);
  526.     pbData[playerid][BombEx] = false;
  527.     pbData[playerid][BombUse] = false;
  528. }
  529. //Quantum bomb
  530. CMD:setqbomb(playerid, params[]){
  531.     new Float:pqx, Float:pqy, Float:pqz;
  532.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  533.     if(pbData[playerid][QBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Quantum bomb");
  534.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  535.     GetPlayerPos(playerid, pqx, pqy, pqz);
  536.     pQBCore[playerid] = CreateObject(919 ,pqx, pqy, pqz-0.5, 0.0,0.0,0.0,100);
  537.     pQBHydraucs[playerid] = CreateObject(930, pqx+0.8, pqy, pqz-0.5, 0.0,0.0,90.0,100);
  538.     pQBombPos[playerid][0] = pqx;
  539.     pQBombPos[playerid][1] = pqy;
  540.     pQBombPos[playerid][2] = pqz;
  541.     pQBombATimer[playerid] = SetTimer("QuantumBombActivation", 5000, false);
  542.     pbData[playerid][QBomb]--;
  543.     pbData[playerid][BombUse] = false;
  544.     pbData[playerid][BombEx] = true;
  545.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}The Quantum bomb has been activated, the effect will start in 3 seconds");
  546.     return 1;
  547. }
  548. public QuantumBombActivation(playerid){
  549.  
  550.     for(new i=0;i<=MAX_PLAYERS;i++){
  551.         if(IsPlayerInRangeOfPoint(i,40, pQBombPos[playerid][0], pQBombPos[playerid][1], pQBombPos[playerid][2])){
  552.             TogglePlayerControllable(i, false);
  553.             SetPlayerPos(i, pQBombPos[playerid][0], pQBombPos[playerid][1], pQBombPos[playerid][2]);
  554.             SetPlayerArmour(i, 0);
  555.             SetPlayerHealth(i, 50);
  556.             SendClientMessage(i, Blren, "[EO_INFO]: {FFFFFF}You have been pulled to the Quantum explosion core");
  557.         }
  558.     }
  559.     CreateExplosion(pQBombPos[playerid][0],pQBombPos[playerid][1], pQBombPos[playerid][2], 2, 50);
  560.     DestroyObject(pQBCore[playerid]);
  561.     DestroyObject(pQBHydraucs[playerid]);
  562.     pbData[playerid][BombUse] = false;
  563.     pbData[playerid][BombEx] = false;
  564.     for(new i=0;i<=MAX_PLAYERS;i++){
  565.         if(IsPlayerInRangeOfPoint(i,40, pQBombPos[playerid][0], pQBombPos[playerid][1], pQBombPos[playerid][2])){
  566.             TogglePlayerControllable(i, true);
  567.             SetPlayerPos(i, pQBombPos[playerid][0]-70, pQBombPos[playerid][1]+60, pQBombPos[playerid][2]+350);
  568.             CreateExplosion(pQBombPos[playerid][0]-70,pQBombPos[playerid][1]+60, pQBombPos[playerid][2]+350, 2, 50);
  569.         }
  570.     }
  571. }
  572.  
  573. //Mines
  574. CMD:plantmine(playerid, params[]){
  575.     new Float:pmx, Float:pmy, Float:pmz;
  576.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  577.     if(pbData[playerid][MBomb] == 0) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You don't have a Mine");
  578.     if(pbData[playerid][BombUse] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Wait before using another bomb");
  579.     GetPlayerPos(playerid, pmx, pmy, pmz);
  580.     pMPos[playerid][0] = pmx;
  581.     pMPos[playerid][1] = pmy;
  582.     pMPos[playerid][2] = pmz;
  583.     pMObject[playerid] = CreateObject(2992,pMPos[playerid][0], pMPos[playerid][1], pMPos[playerid][2]-0.85, 0.0, 0.0, 0.0, 3);
  584.     pAMCheck[playerid] = SetTimer("MineCheck", 50, true);
  585.     pbData[playerid][MBomb]--;
  586.     pbData[playerid][BombUse] = false;
  587.     pbData[playerid][BombEx] = true;
  588.     pbData[playerid][MBombEx] = true;
  589.     pbData[playerid][AMBomb] = false;
  590.     return 1;
  591. }
  592. CMD:activatemine(playerid,params[]){
  593.     if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: You are not connected to the server");
  594.     if(pbData[playerid][MBombEx] == false) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: There is no Mine to activate");
  595.     if(pbData[playerid][AMBomb] == true) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: Your Mine bomb is already activated");
  596.     pbData[playerid][AMBomb] = true;
  597.     SendClientMessage(playerid, Blren, "[EO_INFO]: {FFFFFF}You have activated your Mine");
  598.     return 1;
  599. }
  600. forward MineCheck(playerid);
  601. public MineCheck(playerid){
  602.     if(pbData[playerid][BombEx] == true && pbData[playerid][MBombEx] == true)
  603.     {
  604.         if(pbData[playerid][AMBomb] == true)
  605.         {
  606.             for(new i=0; i<=MAX_PLAYERS; i++)
  607.             {
  608.                 if(IsPlayerInRangeOfPoint(i,2,pMPos[playerid][0],pMPos[playerid][1],pMPos[playerid][2]))
  609.                 {
  610.                     if(!IsPlayerConnected(i)) continue;
  611.                     SetPlayerArmour(i, 0);
  612.                     SetPlayerArmour(i,10);
  613.                     CreateExplosion(pMPos[playerid][0],pMPos[playerid][1], pMPos[playerid][2], 2, 30);
  614.                     DestroyObject(pMObject[playerid]);
  615.                     pbData[playerid][BombUse] = false;
  616.                     pbData[playerid][BombEx] = false;
  617.                     pbData[playerid][MBombEx] = false;
  618.                     pbData[playerid][AMBomb] = false;
  619.                 }
  620.             }
  621.         }
  622.     }
  623. }
  624. //Barrel
  625. CMD:placeeb(playerid, params[]){
  626.     new Float:ebx, Float:eby, Float:ebz;
  627.     GetPlayerPos(playerid, ebx, eby, ebz);
  628.     CreateObject(1225, ebx+0.5, eby, ebz, 0.0, 0.0, 0.0);
  629.     pbData[playerid][EBBomb]--;
  630.     return 1;
  631. }
  632. ////////////////////////////////  TIMERS   //////////////////////////////////////
  633.  
  634. //Time to explode
  635. public BombTimer(playerid){
  636.     KillTimer(pBombTimer[playerid]);
  637.     CreateExplosion(pBombPos[playerid][0],pBombPos[playerid][1], pBombPos[playerid][2], 1, 5);
  638.     pbData[playerid][BombUse] = false;
  639.     SetTimerEx("BombBrakeTimer", BrakingTimer, false, "i", playerid);
  640.     DestroyObject(pBomb[playerid]);
  641.     pbData[playerid][BombEx] = false;
  642. }
  643. //Timed bomb exploding timer
  644. public TimingBombTimer(playerid){
  645.     if(pbData[playerid][BombEx] == true){
  646.         KillTimer(pBombTimer[playerid]);
  647.         CreateExplosion(pBombPos[playerid][0],pBombPos[playerid][1], pBombPos[playerid][2], 1, 5);
  648.         pbData[playerid][BombEx] = false;
  649.         DestroyObject(pBomb[playerid]);
  650.     }
  651. }
  652. //Car bomb clearing
  653. public VehicleCarBombClear(vehicleid){
  654.     new str[250],Count=0;
  655.     for(new i=0; i<=MAX_VEHICLES;i++){
  656.         if(vbData[i][CarBomb] == true) return Count++;
  657.         vbData[i][CarBomb] = false;
  658.     }
  659.     format(str,sizeof(str), "[EO_INFO]: {FFFFFF}All vehicle bombs were cleared, {FFFF00}(total: %i)",Count);
  660.     SendClientMessageToAll(Blren, str);
  661.     return 1;
  662. }
  663. /////////////////////////// Brake Timer    ///////////////////////////////////
  664. forward BombBrakeTimer(playerid);
  665. public BombBrakeTimer(playerid){
  666.     pbData[playerid][BombUse] = true;
  667. }
  668.  
  669.  
  670. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  671. {
  672.     new Float:x, Float:y, Float:z;
  673.     if(vbData[vehicleid][CarBomb] == true){
  674.         GetVehiclePos(vehicleid, x, y, z);
  675.         SetVehicleHealth(vehicleid, 0);
  676.         CreateExplosion(x,y, z, 2, 10);
  677.         pbData[playerid][BombEx] = false;
  678.         vbData[vehicleid][BombUse] = false;
  679.         vbData[vehicleid][CarBomb] = false;
  680.     }
  681.     return 1;
  682. }
  683.  
  684. public OnPlayerExitVehicle(playerid, vehicleid)
  685. {
  686.     return 1;
  687. }
  688.  
  689. public OnPlayerStateChange(playerid, newstate, oldstate)
  690. {
  691.     return 1;
  692. }
  693.  
  694. public OnPlayerEnterCheckpoint(playerid)
  695. {
  696.     return 1;
  697. }
  698.  
  699. public OnPlayerLeaveCheckpoint(playerid)
  700. {
  701.     return 1;
  702. }
  703.  
  704. public OnPlayerEnterRaceCheckpoint(playerid)
  705. {
  706.     return 1;
  707. }
  708.  
  709. public OnPlayerLeaveRaceCheckpoint(playerid)
  710. {
  711.     return 1;
  712. }
  713.  
  714. public OnRconCommand(cmd[])
  715. {
  716.     return 1;
  717. }
  718.  
  719. public OnPlayerRequestSpawn(playerid)
  720. {
  721.     return 1;
  722. }
  723.  
  724. public OnObjectMoved(objectid)
  725. {
  726.     return 1;
  727. }
  728.  
  729. public OnPlayerObjectMoved(playerid, objectid)
  730. {
  731.     return 1;
  732. }
  733.  
  734. public OnPlayerPickUpPickup(playerid, pickupid)
  735. {
  736.     return 1;
  737. }
  738.  
  739. public OnVehicleMod(playerid, vehicleid, componentid)
  740. {
  741.     return 1;
  742. }
  743.  
  744. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  745. {
  746.     return 1;
  747. }
  748.  
  749. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  750. {
  751.     return 1;
  752. }
  753.  
  754. public OnPlayerSelectedMenuRow(playerid, row)
  755. {
  756.     return 1;
  757. }
  758.  
  759. public OnPlayerExitedMenu(playerid)
  760. {
  761.     return 1;
  762. }
  763.  
  764. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  765. {
  766.     return 1;
  767. }
  768.  
  769. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  770. {
  771.     return 1;
  772. }
  773.  
  774. public OnRconLoginAttempt(ip[], password[], success)
  775. {
  776.     return 1;
  777. }
  778.  
  779. public OnPlayerUpdate(playerid)
  780. {
  781.     return 1;
  782. }
  783.  
  784. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  785. {
  786.     if(dialogid == DIALOG_EVMINDEX){
  787.         switch(listitem){
  788.             case 0:{
  789.                 if(GetPlayerMoney(playerid) >= BombP){
  790.                     new string[120];
  791.                     pbData[playerid][Bomb]++;
  792.                     GivePlayerMoney(playerid, -TBombP);
  793.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Bomb for $%i, the use instructions via /ehelp",BombP);
  794.                     SendClientMessage(playerid, 0xFFFF0088, string);
  795.                 }
  796.                 else
  797.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  798.             }
  799.             case 1:{
  800.                 if(GetPlayerMoney(playerid) >= TBombP){
  801.                     new string[120];
  802.                     pbData[playerid][TBomb]++;
  803.                     GivePlayerMoney(playerid, -TBombP);
  804.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Timing Bomb for $%i, the use instructions via /ehelp",TBombP);
  805.                     SendClientMessage(playerid, 0xFFFF0088, string);
  806.                 }
  807.                 else
  808.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  809.             }
  810.             case 2:{
  811.                 if(GetPlayerMoney(playerid) >= C4P){
  812.                     new string[120];
  813.                     pbData[playerid][C4]++;
  814.                     GivePlayerMoney(playerid, -C4P);
  815.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a C4 for $%i, the use instructions via /ehelp",C4P);
  816.                     SendClientMessage(playerid, 0xFFFF0088, string);
  817.                 }
  818.                 else
  819.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  820.             }
  821.             case 3:{
  822.                 if(GetPlayerMoney(playerid) >= CBombP){
  823.                     new string[120];
  824.                     pbData[playerid][CBomb]++;
  825.                     GivePlayerMoney(playerid, -CBombP);
  826.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Car Bomb for $%i, the use instructions via /ehelp",CBombP);
  827.                     SendClientMessage(playerid, 0xFFFF0088, string);
  828.                 }
  829.                 else
  830.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  831.             }
  832.             case 4:{
  833.                 if(GetPlayerMoney(playerid) >= ABombP){
  834.                     new string[120];
  835.                     pbData[playerid][ABomb]++;
  836.                     GivePlayerMoney(playerid, -ABombP);
  837.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought an Atomic Bomb for $%i, the use instructions via /ehelp",ABombP);
  838.                     SendClientMessage(playerid, 0xFFFF0088, string);
  839.                 }
  840.                 else
  841.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  842.             }
  843.             case 5:{
  844.                 if(GetPlayerMoney(playerid) >= SBombP){
  845.                     new string[120];
  846.                     pbData[playerid][SBomb]++;
  847.                     GivePlayerMoney(playerid, -SBombP);
  848.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Sticky Bomb for $%i, the use instructions via /ehelp",SBombP);
  849.                     SendClientMessage(playerid, 0xFFFF0088, string);
  850.                 }
  851.                 else
  852.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  853.             }
  854.             case 6:{
  855.                 if(GetPlayerMoney(playerid) >= SuBombP){
  856.                     new string[120];
  857.                     pbData[playerid][SuBomb]++;
  858.                     GivePlayerMoney(playerid, -SuBombP);
  859.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Suicidal Bomb vest for $%i, the use instructions via /ehelp",SuBombP);
  860.                     SendClientMessage(playerid, 0xFFFF0088, string);
  861.                 }
  862.                 else
  863.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  864.             }
  865.             case 7:{
  866.                 if(GetPlayerMoney(playerid) >= QBombP){
  867.                     new string[120];
  868.                     pbData[playerid][QBomb]++;
  869.                     GivePlayerMoney(playerid, -QBombP);
  870.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Quantum bomb for $%i, the use instructions via /ehelp",QBombP);
  871.                     SendClientMessage(playerid, 0xFFFF0088, string);
  872.                 }
  873.                 else
  874.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  875.             }
  876.             case 8:{
  877.                 if(GetPlayerMoney(playerid) >= MBombP){
  878.                     new string[120];
  879.                     pbData[playerid][MBomb]++;
  880.                     GivePlayerMoney(playerid, -MBombP);
  881.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought a Mine for $%i, the use instructions via /ehelp",MBombP);
  882.                     SendClientMessage(playerid, 0xFFFF0088, string);
  883.                 }
  884.                 else
  885.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  886.             }
  887.             case 9:{
  888.                 if(GetPlayerMoney(playerid) >= EBarrelP){
  889.                     new string[120];
  890.                     pbData[playerid][EBBomb]++;
  891.                     GivePlayerMoney(playerid, -EBarrelP);
  892.                     format(string, sizeof(string), "[EO_INFO]: {FFFFFF}You bought an explosive barrel for $%i, the use instructions via /ehelp",EBarrelP);
  893.                     SendClientMessage(playerid, 0xFFFF0088, string);
  894.                 }
  895.                 else
  896.                     SendClientMessage(playerid, 0xFF000088, "[ERROR]: {FFFFFF}You can't afford this");
  897.             }
  898.         }
  899.     }
  900.     if(dialogid == DIALOG_TBomb){
  901.         if(strval(inputtext)>60 || strval(inputtext)<3) return SendClientMessage(playerid, 0xFF000088, "[ERROR]: The seconds value must be closed between 3 and 60");
  902.         pBombTimer[playerid] = SetTimerEx("TimingBombTimer",strval(inputtext)*1000, false, "i", playerid);
  903.         GetPlayerPos(playerid, gC[0], gC[1], gC[2]);
  904.         pBombPos[playerid][0] = gC[0];
  905.         pBombPos[playerid][1] = gC[1];
  906.         pBombPos[playerid][2] = gC[2];
  907.         pBomb[playerid] = CreateObject(1252, gC[0], gC[1], gC[2], 0.0, 0.0,0.0);
  908.         pbData[playerid][TBomb]--;
  909.         pbData[playerid][BombUse] = false;
  910.         pbData[playerid][BombEx] = true;
  911.     }
  912.     return 1;
  913. }
Add Comment
Please, Sign In to add comment