Page cover

🧨Flashbang

A fully featured, standalone flashbang system for FiveM with realistic effects, AI interaction, and 3D audio support.

🚀 Features

  • 💥 Custom addon flashbang weapon with 0-damage frag explosion

  • 💥 Single flashbang or multi-banger (9-banger) support

  • 👁️ Configurable masks dampen the effects (like gas masks or sunglasses)

  • 🎧 Full 3D positional audio using native GTA explosions

  • 👁️ LOS and directional detection — players only get blinded if they see the detonation

  • 🧠 Realistic flash effects: whiteout, blurred vision, drunk movement, and ear ringing

  • 🧍‍♂️ NPCs react with panic, ragdoll, and flee behavior

  • 🎮 Easy-to-use exports for full integration with other scripts

  • ⚙️ Fully configurable via config.lua

  • 📦 Flashbang 3D model and custom add-on weapon included


🧱 Installation

Follow instructions in Getting Started


🎯 How It Works

  • Players throw the flashbang (addon weapon).

  • After a realistic cook time (configurable), the grenade explodes with a visual and audio effect.

  • Nearby players are:

    • Fully flashed if they were looking at it and had line of sight.

    • Partially disoriented if they were nearby but not looking directly.

    • Unaffected if behind solid cover.

  • NPCs are stunned or flee if within range and have line of sight.


📤 Exports

Client Exports

Export
Description
exports["RPW_Flashbang"]:TriggerFlashEffect(coords)

Applies flash effect on the local player

exports["RPW_Flashbang"]:IsPlayerFlashed()

Returns true if the player is currently flashed

exports["RPW_Flashbang"]:DetonateFlashbang(coords)

Triggers a flashbang effect manually

exports["RPW_Flashbang"]:GetFlashbangConfig()

Returns the current flashbang config table


⚙️ Configuration

Config = {
    FlashbangRadius = 15.0,        -- Max distance for full effect
    StunDuration = 5000,           -- Time the player is disoriented
    CookTime = 2000,               -- Time from throw to detonation
    FlashAffectsNPCs = true,       -- Enable AI reactions
    FlashIntensity = 1.0           -- from 0.1 (light) to 1.0 (full)
}

Config.AntiFlashMasks = {
    [36] = true, -- example: ID of mask model
    [52] = true, -- add as many as you need!
}

Config.MaskProtectionStrength = 'partial' -- options: 'none', 'partial', 'full'

Config.MultiFlashbang = {
    enabled = true -- Whether this should be a nine-banger or a single flash/bang
}

🔊 Custom Audio

To use custom audio for the flashbang, find your chosen .mp3 file and replace flashbang.mp3 within the html/ folder

Last updated