Configuration
The script offers several configuration options to fit your FiveM server.
You can change these settings to adjust the features to your needs.
Configuration file
Section titled “Configuration file”- The configuration file is located in the shared folder, named
config.lua. - Open this file with a text editor (such as Notepad++, Visual Studio Code or even Notepad 😜).
Main settings
Section titled “Main settings”Here are the settings you can customize:
Config = {}
-- ============================================================-- General-- ============================================================Config.Debug = falseConfig.Locale = 'en' -- fr, en, de, es
-- ============================================================-- Notifications-- ============================================================Config.Notifications = { enabled = true, provider = 'auto', -- 'auto', 'default', 'mythic_notify', 'wasabi_notify', 'noxen_notify', 'okokNotify' placing = true, placed = true, activated = true, ended = true, expired = true, errors = true,}
-- ============================================================-- Keys-- ============================================================Config.Keys = { place = { command = 'smokebomb_place', key = 'K' }, detonate = { command = 'smokebomb_detonate', key = 'G' },}
-- ============================================================-- Behaviour-- ============================================================Config.MaxBombsPerPlayer = 5Config.DetonateRadius = 80.0Config.DetonateOnlyOwn = trueConfig.PlaceCooldown = 2Config.DetonateCooldown = 2Config.PlaceDistance = 0.7Config.MaxPlaceDistance = 3.0
Config.SmokeDuration = 25Config.AutoDeleteTime = 300
-- ============================================================-- Stock (optional, standalone)-- ============================================================Config.Stock = { enabled = true, giveCommand = 'givesmokebomb',}
-- ============================================================-- Inventory item-- ============================================================Config.Inventory = { enabled = true, resource = 'ox_inventory', item = 'intense_smoke_grenade',}
-- ============================================================-- Prop-- ============================================================Config.Prop = { model = 'intense_smoke_grenade', zOffset = 0.0,}
-- ============================================================-- Animations-- ============================================================Config.PlaceAnim = { dict = 'pickup_object', name = 'pickup_low', duration = 1200, placeAt = 750, flags = 0,}
Config.DetonateAnim = { enabled = true, dict = 'anim@mp_player_intmenu@key_fob@', name = 'fob_click', duration = 1000, flags = 48, delay = 300,}
-- ============================================================-- Smoke-- ============================================================Config.Smoke = { grenadeExplosion = true, explosionType = 20, stagger = 250,
ptfx = { enabled = true, asset = 'core', name = 'exp_grd_grenade_smoke', offset = { x = 0.0, y = 0.0, z = 0.1 }, scale = 1.0, color = nil, -- e.g. { r = 255, g = 50, b = 50 } },}
-- ============================================================-- UI sounds-- ============================================================Config.Sounds = { Place = { enabled = true, name = 'Bomb_Plant', set = 'FBI_05_SOUNDS' }, Detonate = { enabled = true, name = 'Beep_Red', set = 'DLC_HEIST_HACKING_SNAKE_SOUNDS' },}General
Section titled “General”- Debug: Enable debug mode (true/false). If true, debug messages are printed to the console (client + server).
- Locale: Language used for messages (
fr,en,de,es).
Notifications
Section titled “Notifications”- enabled: Enable or disable all notifications (debug logs are kept).
- provider: Notification system to use.
autoautomatically detects mythic_notify, wasabi_notify, noxen_notify or okokNotify, otherwise uses the native GTA notification (default). - placing / placed / activated / ended / expired / errors: Enable or disable each notification type individually (placing, placement succeeded, bombs activated, smoke ended, bomb expired, errors).
- place / detonate: Command and default key to place and detonate the bombs. Set
key = ''to leave it unbound by default. Players can rebind them in the FiveM settings.
Behaviour
Section titled “Behaviour”- MaxBombsPerPlayer: Maximum number of bombs placed at the same time per player.
- DetonateRadius: Radius (in metres) around the player within which bombs are detonated.
- DetonateOnlyOwn: If
true, a player can only detonate their own bombs. - PlaceCooldown: Time (in seconds) between two placements, checked server-side.
- DetonateCooldown: Time (in seconds) between two detonations, checked server-side.
- PlaceDistance: Distance in front of the player where the bomb is placed.
- MaxPlaceDistance: Maximum distance allowed by the server between the player and the bomb when placing (anti-cheat).
- SmokeDuration: Smoke duration in seconds. The bomb is deleted afterwards.
- AutoDeleteTime: A bomb that is never detonated is deleted after X seconds (
0= never).
Internal stock
Section titled “Internal stock”- enabled: If
true, the player must have bombs in stock (given via the admin command or theAddBombsexport). Iffalse, placement is unlimited. Ignored when the inventory item is active. - giveCommand: Name of the admin command to give bombs (
/givesmokebomb [id] [amount]).
Inventory item
Section titled “Inventory item”- enabled: Use an inventory item (takes priority over the internal stock when the inventory resource is started).
- resource: Name of the inventory resource (
ox_inventory). - item: Item name. It must be identical to the name declared in your inventory.
3D model
Section titled “3D model”- model: Name of the bomb model (provided in
stream/). Vanilla fallback model:prop_bomb_01. - zOffset: Vertical adjustment if the model sinks into the ground or floats above it.
Animations
Section titled “Animations”- PlaceAnim: Placing animation (dictionary, name, duration in ms,
placeAt= moment the bomb appears on the ground). - DetonateAnim: Remote control animation (
flags = 48= upper body only,delay= delay in ms before the detonation is sent).
- grenadeExplosion: Use the native smoke grenade explosion (sound and smoke synced for every player).
- explosionType: Explosion type (
20= smoke grenade). - stagger: Delay (in ms) between each bomb activation, so the game does not drop simultaneous explosions.
- ptfx: Extra smoke (particles) kept for
SmokeDurationto thicken the smoke screen: asset, name, offset, size (scale) and colour (color, e.g.{ r = 255, g = 50, b = 50 }for red smoke).
Sounds
Section titled “Sounds”- Place / Detonate: UI sounds played when placing and detonating (GTA sound name and set). The smoke sound is the grenade’s.
- After every change to the configuration file, restart the script or the server for the changes to take effect.
- If a setting is not recognized, check that it is spelled correctly and placed in the right section of the file.