Installation
Five minutes, most of it adding the items to your inventory.
Before you start
Section titled “Before you start”| You need | Why |
|---|---|
| ESX, QBCore or QBox, running | The four usable items are registered through your framework |
| An inventory that can hold five new items | ox_inventory, qb-inventory or the ESX default all work |
1. Put the folder in place
Section titled “1. Put the folder in place”Drop mic_carbomb into your resources, for example inside resources/[mic]/. There is no props resource to go with it.
2. Start it after your framework
Section titled “2. Start it after your framework”In server.cfg, put ensure mic_carbomb below your framework (es_extended, qb-core or qbx_core) and your inventory.
It worked when the server console shows no red line from mic_carbomb on start. The one you do not want to see is “Invalid framework specified in config.lua. Use ‘esx’ or ‘qbcore’.”
3. The database — nothing of its own
Section titled “3. The database — nothing of its own”mic_carbomb keeps planted bombs in the server’s memory, not in the database. The only database step is the ESX item rows in step 4, and only if you use the default ESX inventory.
4. Add the items
Section titled “4. Add the items”| Item | What it does |
|---|---|
car_bomb | Use it to hold a bomb, then press E next to a vehicle to plant it |
phone_detonator | Opens the detonator phone: your bombs, detonate now or on a timer |
bomb_detector | Takes out the scanner; use it again to put it away |
bomb_defuser | Takes out the toolbox; press E next to a bombed vehicle to defuse |
defused_bomb | Not usable. Given back after a defusal when Config.ReturnDefusedBomb is on |
The ready-made definitions ship in inventory_items/, and the icons in inventory_images/:
| Inventory | Definitions (mic_carbomb/inventory_items/) | Where they go | Icons |
|---|---|---|---|
| ox_inventory | ox_inventory.md | ox_inventory/data/items.lua | Copy inventory_images/*.png to ox_inventory/web/images/ |
| QBCore / qb-inventory | qb_inventory.md | qb-core/shared/items.lua | Copy them to qb-inventory/html/images/ |
| ESX default inventory | esx_sql_items.md | Run the statement in it once on your database | — |
It worked when you give yourself one of each and all five show in your inventory with their icon.
5. Tell it your framework
Section titled “5. Tell it your framework”Open config.lua and set Config.Framework to esx (the default) or qbcore. There is no auto-detect. On QBox, choose qbcore: QBox runs QBCore resources through its compatibility layer.
While you are there: Config.WebhookEnabled is on out of the box with a placeholder URL. Either paste your Discord webhook into Config.WebhookURL, or set WebhookEnabled to false.
6. First test
Section titled “6. First test”- Spawn a vehicle and step out of it.
- Use
car_bomb. A bomb appears in your hand. Walk up to the vehicle (within 2 m) and press E. The planting animation plays for two seconds and the bomb is gone from your hand. - Use
bomb_detectorand look at the vehicle. It beeps, and a red blip sits on the vehicle. - Use
bomb_detectoragain to put it away. Walk well clear of the vehicle, but keep it in sight — the detonator can only blow a vehicle that is loaded around you. - Use
phone_detonator. The phone lists the vehicle’s model and plate. Press the green key.
It worked when the vehicle explodes and disappears from the phone’s list.
To test defusing, plant a second bomb, use bomb_defuser, stand next to the vehicle and press E. It worked when the repair animation finishes, the beeping stops, and a car_bomb comes back to you.
Before you open your city
Section titled “Before you open your city”Config.Frameworkmatches the framework you actually run (qbcoreon QBox).- QBCore: every item
nameequals its key. - The webhook is either a real URL or switched off.
config.luais sent to every player (it is a shared script). Anyone who digs through their client files can read the webhook URL. Use a webhook for a channel you are happy to have spammed, or leave it off.- Decide what items cost. Out of the box planting does not use up the bomb (
Config.RemoveItemis off), so onecar_bombplants as many bombs as the player likes.