Stungrenade
Click here if the video above doesn’t work. (Youtube)
IMPORTANT NOTE: If you use an escrowed inventory that doesn’t support addon-throwing weapons then I can’t help you. It’s a problem with the inventory script, not with this script.
About
Stungrenade is a standalone stungrenade (flashbang) script that does just as its name says; adds stungrenades! The stungrenade is added in as an add-on weapon (with a weapon icon in the weapon wheel), that detonates after a configurable timer (1.5 seconds by default). Any person standing close and in direct sight of the stungrenade will then be flashed.
The model included is custom-made. The resmon varies between 0.0 and 0.03 ms at the most. (0.00 when you aren’t flashed nor have the stungrenade in your hand, 0.02 ms when the stungrenade is in your hand).
There are included inventory images with the script, however, you’ll have to add the stungrenade in as an item yourself. Here are two of the images as an example:
The script can be configured more or less however you want, and all of the code is accessible (note that the stungrenade model is escrowed, however, the texture is not), look below to see the config file.
Config.lua
Config = {}
-- This is the name that get's displayed in the weapons wheel ect. You can change this to "Flashbang" (or anything for that matter) if you want to.
-- Alternative names: "flash grenade", "flashbang", "thunderflash" or "sound bomb" (Yes I took these from wikipedia)
Config.WeaponName = "Stun Grenade"
Config.Timer = 1500 -- The time it takes for the stungrenade to detonates from it being thrown
Config.MaxDist = 30.0 -- The maximum distance (meters) the player can be from the stungrenade and still be effected by it
Config.MaxEffectTime = 15000 -- The max time in milliseconds that the effect will last
Config.ShowFlashEffect = true -- If true makes the screen white when flashed
Config.OnlyUseTimecycle = false -- If set to true, the script only uses timecycle effects to make the flash effects, if set to false, html will also be used along side a timecycle to make the flash effect.
Config.AllowEffectThroughGlass = true -- Makes the flash effect ignore glass materials when it does a raycast
Config.EffectCanBounce = true -- Allows the flash effect to bounce inside a room.
-- The particle effect that get's played when the stungrenade detonates
Config.Ptfx = { asset = "core", name = "exp_arc_stun_grenade" } -- Alternative: Config.Ptfx = { asset = "core", name = "exp_arc_grd_flashbang" }
Config.PlaySound = true -- Will play a ringing noise/sound
Config.Volume = 0.5 -- The volume the ringing will be played at.
Config.MaxVolume = 1.0 -- A safe guard to prevent
Config.PlayAnim = false -- Plays the anim spesifed below. (Covers eyes)
Config.Anim = {
dict = "anim@heists@ornate_bank@thermal_charge",
name = "cover_eyes_loop"
}
Config.DisableShooting = false -- If true, shooting will be disabled while you are effected by the flash
Config.DisableAiming = false -- If true, aiming (a weapon) is disabled while ffected by the flash (should be used in combination with Config.DisableShooting)
Config.DisableWeaponWheel = true -- If true, the weapon wheel will be disabled while you are effected by the flash
Config.ApplyDamage = true -- If the stungrrenade should damage people who stand very close to it when it detonates. Note: even if you set this to false, you may still be damaged if Config.RagdollEnabled is set to true (fall damage)
Config.DamageArmourFirst = true
Config.MaxDamage = 15.0
Config.MaxDamageDist = 4.0
Config.HideMinimap = true -- Hides the minimap while blinded
Config.ApplyWalk = true -- Temporarily overwrites the players walkstyle to the one spesifed below, the walkstyle get's reverted back to the players's original one when the effect is over
Config.Walk = "move_m@hobo@a"
-- Mutes the game sounds (and voices if you use fivem's inbuild mumble) while flashed
Config.UseSubmix = true
-- The type of explision that is triggered
Config.ExplosionType = 0
Config.RagdollEnabled = true -- If the explosion should ragdoll players that stand really close to the grenade when it explodes
Config.MaxRagdollDist = 4.0 -- The maximum distance from the explosion you can be ragdolled
-- If true, npc's will be directyl effected by the stungrenade (ragdoll) (NOTE: they will flee regardless of what this is set to)
Config.EffectNPCs = true
Config.MaxNPCEffectRadius = 5.0 -- The maximum distance away from the blast the npc ped will be directly effected
Config.NPCEffectModifer = 2.5
Config.AllowVehicleTint = true -- If true, then window tint will reduce the flash effect
Config.TintReduction = { -- Reduce by %
[-1] = false, -- Stock
[0] = false, -- None
[1] = 50.0, -- Pure Black
[2] = 30.0, -- Dark Smoke
[3] = 10.0, -- Light Smoke
[4] = false, -- Stock
[5] = false, -- Limo
[6] = false -- Green
}
-- These were made for the default clothes, you might want to go trough this list if you have custom hats and glasses (EUP for example) to ensure that they are appropriate.
Config.EyeProtectionEnabled = true -- If set to true, some hats and glasses will reduce the flash effect (in %)
Config.EyeProtection = {
-- Hats / Helmets
[0] = {
[18] = 15.0,
[38] = 20.0,
[47] = 20.0,
[50] = 35.0,
[51] = 35.0,
[52] = 35.0,
[53] = 35.0,
[62] = 20.0,
[73] = 15.0,
[78] = 15.0,
[80] = 15.0,
[82] = 15.0,
[91] = 35.0,
[111] = 35.0,
[115] = 35.0,
[123] = 15.0,
[125] = 15.0,
[144] = 17.5,
},
-- Glasses
[1] = {
[24] = 30.0,
[25] = 30.0
}
}
Config.EarProtectionEnabled = true -- If set to true, some hats will reduce the audio/ringing effect (in %)
Config.EarProtection = {
[0] = {
-- Hats/helmets (prop cat. 0)
[0] = 100.0, -- Hearing Protection
[15] = 10.0, -- Ear muffs
[16] = 20.0,
[17] = 20.0,
[18] = 20.0,
[19] = 100.0, -- Pilot Hearing Protection
[38] = 20.0,
[47] = 20.0,
[48] = 20.0, -- Crosser Bike Helmet
[49] = 20.0, -- Crosser Bike Helmet
[50] = 20.0, -- Bike Helmet
[51] = 20.0, -- Bike Helmet
[52] = 20.0, -- Bike Helmet
[53] = 20.0, -- Bike Helmet
[62] = 20.0, -- Coloured Bike Helmet
[67] = 20.0, -- Bike Helmet
[68] = 20.0, -- Bike Helmet
[69] = 20.0, -- Bike Helmet
[70] = 20.0, -- Bike Helmet
[71] = 20.0, -- Bike Helmet
[72] = 20.0, -- Bike Helmet
[73] = 20.0, -- Stunt Bike Helmet
[74] = 20.0, -- Stunt Bike Helmet
[75] = 20.0, -- Scooter Helmet
[78] = 20.0, -- Stunt Bike Helmet
[79] = 20.0, -- Stunt Bike Helmet
[80] = 20.0, -- Bike Helmet
[81] = 20.0, -- Bike Helmet
[82] = 20.0, -- Bike Helmet
[91] = 20.0, -- Bike Helmet
[92] = 20.0, -- Bike Helmet
[93] = 20.0, -- Bike Helmet
[111] = 20.0, -- Coloured Pilot Helmet
[115] = 40.0,
[116] = 100.0,
[117] = 100.0,
[118] = 100.0,
[119] = 100.0,
[123] = 30.0,
[124] = 30.0,
[125] = 10.0,
[126] = 10.0,
[127] = 20.0, -- Bike Helmet
[128] = 20.0, -- Bike Helmet
[144] = 10.0,
[150] = 100.0
}
}
If you have any questions please leave a comment and I’ll answer them ASAP!
Purchase on Tebex
You can purchase it here through Tebex. (8.00 USD + tax)
Code is accessible | Yes (model is escrowed) |
Subscription-based | No |
Lines (approximately) | 800 |
Requirements | Game build 2060 or higher |
Support | Yes |