Skip to content

Configuration

The script offers several configuration options to fit your FiveM server.
You can change these settings to adjust the features to your needs.

  • 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 😜).

Here are the settings you can customize:

Config = {}
-- ============================================================
-- General
-- ============================================================
Config.Debug = false
Config.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 = 5
Config.DetonateRadius = 80.0
Config.DetonateOnlyOwn = true
Config.PlaceCooldown = 2
Config.DetonateCooldown = 2
Config.PlaceDistance = 0.7
Config.MaxPlaceDistance = 3.0
Config.SmokeDuration = 25
Config.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' },
}
  • 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).
  • enabled: Enable or disable all notifications (debug logs are kept).
  • provider: Notification system to use. auto automatically 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.
  • 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).
  • enabled: If true, the player must have bombs in stock (given via the admin command or the AddBombs export). If false, placement is unlimited. Ignored when the inventory item is active.
  • giveCommand: Name of the admin command to give bombs (/givesmokebomb [id] [amount]).
  • 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.
  • 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.
  • 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 SmokeDuration to thicken the smoke screen: asset, name, offset, size (scale) and colour (color, e.g. { r = 255, g = 50, b = 50 } for red smoke).
  • 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.