Overview & Specifications
Two pepper sprays and a pepper ball launcher for FiveM police and security, in one resource. A sprayed player coughs, blinks and rubs their eyes, and struggles to run, jump and aim until it wears off or the eyes are rinsed. Launcher balls shatter car windows and burst into OC clouds that drift with the wind. Custom 3D models and animations, gas masks, decon items and forensic swabs are included, and it detects QBCore, Qbox, ESX or standalone by itself.
What's Included
- Duty Pocket OC Spray: Compact duty canister with custom one-handed grip, quick-draw animations, and realistic nozzle actuation.
- RC-15 Riot Canister: Heavy crowd-control canister featuring a tactical pistol grip, wider spray cone, and high-volume output.
- Pneumatic Pepper Ball Launcher: Semi-auto rifle with gravity-fed hopper, crisp first-person red-dot optic, and realistic projectile physics.
- 10 Custom 3D Items: Original canisters, reload pods, tactical respirator, saline bottles, and medical decon wipes.
Bespoke Custom Animations
- Tactical Hopper Reload: Operator tilts launcher, pops the hopper lid, pours pepper balls from a vest pod, and drops the spent prop.
- Two-Stage Victim Reactions: Victims hunch over, cough, rub their eyes, stumble-walk, and show visible pained expressions.
- Handcuff & Vehicle Safe: Cuffed suspects keep hands behind their backs with zero animation glitching; drivers cover eyes with one hand while steering.
- Synchronized Partner Eye Flush: Smooth two-player interaction where another player steps in and pours saline directly into a victim's eyes.
Interactive Decontamination & Medical Relief
- Player-to-Player Partner Flushes: Other players, officers, or EMS can step up to a suffering victim, interact via target menu or keybind, and flush their eyes with saline to rapidly remove burning and blur.
- Self-Treatment & Field Wipes: Victims can self-administer saline wash or use medical decon wipes to immediately cut exposure stages in half.
- Gas Mask Protection: By default the included 6-strap gas mask blocks the spray and clouds completely. You choose how much it protects, and how much any EUP mask, helmet or pair of goggles protects.
- Environmental Water Decon: Submerging or swimming in any water source (ocean, rivers, pools) naturally washes away chemical residue.
Key Features & Police Mechanics
- Window Shattering & Powder Clouds: Direct launcher impacts shatter vehicle glass and burst into lingering orange OC clouds.
- Wind & Weather Reactive: Mist and clouds drift naturally with wind speed; headwinds can blow spray back onto the shooter.
- Closed Cabin Shielding: Vehicle doors and closed windows fully shield occupants; spraying through broken glass fills the cabin.
- Police Forensic Evidence: Officers and medics can physically inspect eye redness and swab hands or clothing for chemical OC residue.
- Modern NUI HUD & Durability: Clean canister gauge, burning intensity bar, and persistent inventory durability syncing.
- 0.00 ms Idle Resmon: Event-driven architecture with zero background polling loops when inactive.
- Instant Framework Integration: Auto-detects QBCore, Qbox, ESX, and Standalone. Pre-bridged for ox_inventory, qb-inventory, ps-inventory, lj-inventory, ox_target and qb-target.
- Open Configuration & Bridges: Both config files, the language files and the framework, inventory, logging, notification and target bridges are unencrypted, so you can adapt them to your server (full list below).
Configuration & Open Files
These files ship unencrypted, so you can read and change them. The rest of the code is protected by Cfx.re Asset Escrow.
config.lua: All the gameplay settings, each one explained (CONFIG.md has more)config_advanced.lua: Technical settings: animations, effects, props and integrationslocales/*.lua: Every text players see, in 6 languages (English, German, Spanish, Finnish, French and Polish)server/framework.lua: The bridge to your framework and inventoryserver/items.lua: Adds the items to your inventoryserver/log.lua: Console and Discord loggingclient/utils.lua: Notifications, progress bar and target menu
nm_pepper/config.luaClick to expand
nm_pepper/config.lua--[[ nm_pepper settings: the two pepper sprays and the pepper ball launcher.
The comments say what each one does.
Technical settings (animations, effects, integrations) are in
config_advanced.lua; you rarely need to touch those.
Times are in seconds, distances in metres. ]]--
Config = {}
Config.Locale = 'en' -- 'en', 'fi', 'de', 'fr', 'es', 'pl' (files in locales/)
Config.DevCommands = false -- test commands (/sprayitem, /gunitem, /spraybot, /gunbot...): never on a live server
-- ---------------------------------------------------------------------
-- Who may use the weapons
-- ---------------------------------------------------------------------
-- Who may carry and use the sprays and the launcher (also the 'spray' access below):
-- 'everyone', 'ace' (the ACE below) or 'job' (Config.Jobs, with ESX or QBCore / Qbox)
Config.Access = 'everyone'
Config.AcePermission = 'pepperspray.use' -- server.cfg: add_ace group.police pepperspray.use allow
Config.Jobs = { police = 0, sheriff = 0 } -- job name = lowest grade
Config.RequireDuty = true -- jobs: only on duty (ESX 1.11+, QBCore / Qbox)
-- Other access settings below take 'everyone', 'spray' (the same players
-- as above), 'ace' (with their `ace`), or jobs: { police = 0, ambulance = 0 }
-- ---------------------------------------------------------------------
-- Framework, inventory and items
-- ---------------------------------------------------------------------
Config.Framework = 'auto' -- 'auto', 'esx', 'qb' (QBCore / Qbox) or 'standalone'
Config.Inventory = 'auto' -- 'auto', 'ox_inventory', 'framework' or 'none'
Config.GiveCommands = 'auto' -- /pepperspray, /riotspray, /peppergun: true, false, or 'auto' (only without an inventory)
Config.AddItems = true -- QBCore, ESX: add the items by itself, QBCore's at each start, ESX's once to its items table. false: add them yourself (INSTALL.md)
Config.CanisterOnItem = true -- ox_inventory, qb-inventory: each spray item keeps its own canister level (a new one is full)
Config.Items = {
canister = 'pepperspray_canister', -- refills the spray in your hand (nil = no canister item)
magazine = 'pepperball_magazine', -- loads one magazine into the launcher (nil = no item)
}
-- Items that rinse the eyes. removeShare: share of the burning taken off at
-- once (0.5 = half). boost / boostTime: the rest then wears off `boost`
-- times faster for `boostTime` seconds. others: used on the affected player
-- in front of you (yourself if there's none). access: who may use it.
Config.RinseItems = {
saline = { label = 'Saline Solution', removeShare = 0.5, boost = 3.0, boostTime = 20, others = false, access = 'everyone' },
pepperspray_wipes = { label = 'Decontamination Wipes', removeShare = 0.2, boost = 1.5, boostTime = 10, others = false, access = 'everyone' },
decon_kit = { label = 'OC Decon Kit', removeShare = 0.85, boost = 4.0, boostTime = 30, others = true, access = 'everyone' },
}
-- ---------------------------------------------------------------------
-- The non-lethal weapons
-- ---------------------------------------------------------------------
Config.Weapons = {
WEAPON_PEPPERSPRAY = {
type = 'spray',
label = 'Pepper Spray',
ammo = 100, -- a full canister: 100 = 10 seconds of spraying
giveCommand = 'pepperspray',
quickDraw = { command = 'drawspray', key = 'F7' }, -- nil = weapon wheel only
range = 5.0,
coneAngle = 25.0, -- degrees either side of the aim
exposureMult = 1.0, -- how strong each hit is
contamination = 1.0, -- how big its cloud is
},
WEAPON_PEPPERSPRAY_RIOT = {
type = 'spray',
label = 'Riot Pepper Spray',
ammo = 200,
giveCommand = 'riotspray',
quickDraw = nil,
range = 7.0,
coneAngle = 28.0,
exposureMult = 1.5,
contamination = 1.5,
},
WEAPON_PEPPERGUN = {
type = 'launcher',
label = 'Pepper Ball Launcher',
giveCommand = 'peppergun',
ammo = 120, -- pepper balls given with the launcher (and by the give command)
magazine = 60, -- balls in one magazine item: a full hopper (it holds 60: meta/weapons.meta)
range = 45.0, -- the balls fly this far at most (keep WeaponRange in meta/weapons.meta the same)
speed = 90.0, -- metres per second (they drop a little on the way)
directHit = 6.0, -- dose for a ball that hits someone (a spray hit is 3.5)
cloud = 1.0, -- how big and strong its powder clouds are
breaksGlass = true, -- a ball smashes the car window it strikes (not bulletproof glass); false: it bursts on the glass
textEntry = 'WT_PEPPERGUN',
textName = 'WEAPON_PEPPERGUN',
},
}
Config.Spray = {
fromVehicle = 'all', -- spray out of an open window: false, 'passenger' or 'all' (the driver too)
}
-- The powder cloud a pepper ball leaves where it bursts.
Config.Cloud = {
enabled = true,
lasts = 4, -- seconds outdoors (it fades out over the second half)
indoorLasts = 7, -- seconds indoors (no wind to carry it off)
radius = 2.0, -- metres, once it has spread
perSecond = 5.0, -- dose per second in a fresh cloud (less at its edge and as it thins): stronger than the spray's haze, but over in seconds
maxPerSecond = 15.0, -- at most this per second, however many clouds overlap
drift = 0.1, -- metres per second per m/s of wind it moves (outdoors)
}
Config.Fx = {
range = 150.0, -- other players this far away see balls, bursts and powder clouds
ball = true, -- show the ball flying through the air
decals = true, -- leave a powder mark on the surface it struck
}
Config.Sound = {
enabled = true,
volume = 0.5, -- 0 to 1
range = 20.0,
}
-- ---------------------------------------------------------------------
-- HUD and interface
-- ---------------------------------------------------------------------
Config.Hud = {
spray = { -- the canister level while a spray is in hand
enabled = true,
style = 'nui', -- 'nui' or 'native' (GTA text)
position = 'top-right', -- 'top-right', 'top-left', 'right', 'bottom', 'bottom-right', 'bottom-left' or 'custom'
x = 0.5, y = 0.86, align = 'center', -- for 'custom': 0 to 1 of the screen, which side sits at x
scale = 1.0,
icon = true,
label = true,
},
ammo = false, -- also GTA's ammo counter shows the level in percent
inventoryLevel = true, -- the inventory item's durability / quality bar shows the level
burning = { -- while affected: "Your eyes and mouth are burning", and how bad it still is
enabled = true,
position = 'top', -- 'top', 'top-left', 'top-right', 'left', 'right', 'bottom' or 'custom'
x = 0.5, y = 0.05, align = 'center', -- for 'custom' (y = the card's top edge)
scale = 1.0,
},
}
Config.UI = {
notify = 'auto', -- 'auto', 'ox_lib', 'qb', 'esx' or 'native'
progress = 'auto', -- 'auto', 'ox_lib', 'qb' or 'none' (a bar while rinsing)
cancelSelf = true, -- a rinse on yourself can be cancelled (an item is given back)
prompts = 'nui', -- key prompts: 'nui' or 'native' (GTA text)
promptStyle = { accent = '#1AA3FF', scale = 1.0 }, -- the color used by the prompts and the HUD
}
Config.Target = {
system = 'auto', -- 'auto', 'ox_target', 'qb-target' or 'none'
distance = 2.0,
replaceKey = true, -- with a target menu, no "Hold E" key for helping others
}
-- ---------------------------------------------------------------------
-- Being sprayed
-- ---------------------------------------------------------------------
-- Every hit adds `perHit`, up to `max` (10 hits). A full dose wears off in
-- `lasts` seconds; the restrictions (no sprinting, jumping, aiming; the
-- stumbling walk) in their own `lasts`. A smaller dose wears off sooner.
Config.Exposure = {
perHit = 3.5,
max = 30.0,
lasts = 240, -- seconds for a full dose
swimmingClears = 7, -- seconds of swimming that wash a full dose off
clearOnDeath = true, -- dying (or going down) clears it all
restrictions = { lasts = 27 },
}
-- Each effect runs while the exposure is at or above its minExposure, so
-- they end one by one as it wears off.
Config.Effects = {
blur = { enabled = true, minExposure = 0.0, -- 0 = until it has all worn off
minStrength = 0.6, maxStrength = 1.0 }, -- 0 to 1: as it wears off, and at a full dose
shake = { enabled = true, minExposure = 0.4, maxAmplitude = 1.2 },
blink = { enabled = true, minExposure = 0.5 }, -- the eyes squeeze shut now and then (more often when worse)
face = { enabled = true, minExposure = 0.3 }, -- a pained face
coughSounds = { enabled = true, volume = 0.4, range = 20.0 },
coverEyes = { enabled = true }, -- the hands over the eyes while being sprayed
eyeFidgets = { enabled = true, minExposure = 0.5 }, -- rubbing the eyes and coughing afterwards
holster = { enabled = true }, -- a weapon in hand goes away during those and rinsing, then comes back
stumble = { enabled = true, minExposure = 0.5 }, -- an injured walk
noSprint = { enabled = true, minExposure = 3.0 },
noJump = { enabled = true, minExposure = 1.5 },
noAim = { enabled = true, minExposure = 8.0 }, -- also no shooting
vehicle = { enabled = true, driver = true }, -- the reactions in a vehicle (driver: the driver too)
vehicleSwerve = { enabled = true, minExposure = 6.0, strength = 0.12 }, -- the driver's steering pulls a little
ragdoll = { enabled = false, minExposure = 15.0, chancePerHit = 0.25 },
screenFx = { enabled = false, minExposure = 5.0 }, -- an extra screen effect
}
-- What others see on someone affected.
Config.Signs = {
enabled = true,
range = 25.0,
snot = { enabled = true, minExposure = 3.0 }, -- a runny nose
sweat = { enabled = true, minExposure = 1.0 },
}
-- The spray drifts: a small cloud where it ends, and back at the sprayer
-- when spraying into the wind outdoors.
Config.CrossContamination = {
enabled = true,
haze = { enabled = true, radius = 2.0, share = 0.2 }, -- share: of a hit
wind = { enabled = true, self = 0.3 },
}
Config.Vehicles = {
windows = true, -- people inside are only reached through an open window or door
cabinShare = 0.3, -- once it gets in, everyone inside gets this share of a hit
}
-- What people wear protects them: 1.0 = fully, 0.5 = half. The best item
-- counts. These are GTA's own MP clothes (the same numbers with EUP, which
-- adds its items after them); /sprayprotection (dev commands) shows yours.
Config.Protection = {
male = {
masks = {
[38] = 1.0, -- Gas Mask
[46] = 1.0, -- Chemical Mask
[129] = 1.0, -- Gas Mask (camo)
[175] = 1.0, -- The gas mask item's full-face mask, with stream/gasmask/
[36] = 0.7, -- Rebreather (goggles and a mouthpiece)
[125] = 0.6, -- Goggled Ballistic
[130] = 0.3, -- Respirator (the eyes are open)
[90] = 0.2, -- Dome Filter (dust mask)
},
hats = { -- helmets with the visor down (visor up gives nothing)
[125] = 0.8, -- Shielded Riot
[123] = 0.6, -- Riot
[115] = 0.7, -- Full Face
[116] = 0.3, -- Dual Lens night vision, down
[147] = 0.3, -- Scope night vision, down
},
glasses = {
[41] = 0.5, -- Tactical Goggles
[24] = 0.4, -- Outlaw Goggles
[25] = 0.4, -- Urban Ski goggles
},
},
female = {
masks = {
[38] = 1.0, -- Gas Mask
[46] = 1.0, -- Chemical Mask
[129] = 1.0, -- Gas Mask (camo)
[175] = 1.0, -- The gas mask item's full-face mask, with stream/gasmask/
[36] = 0.7, -- Rebreather
[125] = 0.6, -- Goggled Ballistic
[130] = 0.3, -- Respirator
[90] = 0.2, -- Dome Filter
},
hats = {
[124] = 0.8, -- Shielded Riot
[122] = 0.6, -- Riot
[114] = 0.7, -- Full Face
[115] = 0.3, -- Dual Lens night vision, down
[146] = 0.3, -- Scope night vision, down
},
glasses = {
[43] = 0.5, -- Tactical Goggles
[26] = 0.4, -- Outlaw Goggles
[27] = 0.4, -- Urban Ski goggles
},
},
other = { masks = {}, hats = {}, glasses = {} }, -- any other ped model
models = {}, -- whole ped models, e.g. s_m_y_swat_01 = 1.0
}
Config.GasMask = {
enabled = true,
item = 'gasmask', -- put on and off by using it
command = 'gasmask', -- the same without an inventory, for those Access lets in (false = none)
protection = 1.0,
mask = { -- the mask it shows (nil = protection only)
-- mask 175, which stream/gasmask/ turns into the full-face mask; texture 0
-- black, 1 olive, 2 grey, 3 tan
male = { drawable = 175, texture = 0 },
female = { drawable = 175, texture = 0 },
},
}
Config.NPC = {
enabled = true,
reaction = 'flee', -- 'flee', 'cower', 'handsup' or 'none'
duration = 5, -- rubbing the eyes after the last hit
cooldown = 8, -- before the same NPC reacts again
scriptPeds = false, -- also NPCs other scripts spawned (shopkeepers, job NPCs, K9)
animals = false,
}
-- ---------------------------------------------------------------------
-- Rinsing the eyes
-- ---------------------------------------------------------------------
Config.Decon = {
enabled = true,
removeShare = 0.5, -- water: share of the burning taken off at once
boost = 3.0, -- ... then the rest wears off this much faster
boostTime = 20, -- ... for this long
helper = { -- rinsing someone else
enabled = true,
command = 'rinse',
key = 'E', -- held while facing them; nil = command only
hold = 0.4, -- how long the key is held
prompt = true, -- "Hold E to help with the burning"
-- With an inventory it takes the first of these the helper carries, and
-- the prompt only shows then. nil = no item. No inventory: plain water.
items = { 'saline', 'decon_kit' },
range = 1.8,
cooldown = 6, -- between rinses by the same helper
victimCooldown = 20, -- before the same person can be rinsed again
access = 'everyone',
ace = 'pepperspray.rinse',
holdStill = true, -- both stay still while it lasts
},
selfRinse = { -- /decon: rinsing your own eyes
enabled = true,
command = 'decon',
key = 'J',
prompt = true, -- "Press J to rinse your eyes"
-- With an inventory it takes the first of these they carry, and the
-- prompt only shows then. nil = no item. No inventory: no item either.
items = { 'saline', 'pepperspray_wipes', 'decon_kit' },
rinseAs = 'saline', -- with no item it works like this rinse item
cooldown = 30,
access = 'everyone',
ace = 'pepperspray.decon',
afterRestrictions = false, -- only once the worst is over
delayAfterHit = 5, -- not this soon after being sprayed
usesPerExposure = 0, -- uses until the eyes are clear again (0 = no limit)
vehicles = true, -- usable in a vehicle
driving = true, -- ... in the driver's seat too
strength = 0.8, -- with no item: 0.5 = half as effective
},
}
-- ---------------------------------------------------------------------
-- Evidence
-- ---------------------------------------------------------------------
Config.Evidence = {
range = 2.0,
checkEyes = { enabled = true, command = 'checkeyes' },
residue = { enabled = true, command = 'swab', minutes = 20, access = 'spray', ace = 'pepperspray.swab' },
}
-- ---------------------------------------------------------------------
-- Refill points
-- ---------------------------------------------------------------------
Config.Refill = {
enabled = false, -- when on, sprays are refilled here (or with a canister), not by the give command
cooldown = 60,
marker = true,
blips = false,
points = {
{ coords = vector3(452.6, -980.0, 30.7), radius = 1.5, label = 'Mission Row armory', jobs = nil },
-- { coords = vector3(x, y, z), radius = 1.5, label = 'Sandy Shores PD', jobs = { sheriff = 0 } },
},
}
-- ---------------------------------------------------------------------
-- Logging (Discord webhook in server.cfg: set pepper_webhook "https://...")
-- ---------------------------------------------------------------------
Config.Logging = {
enabled = false,
console = true,
name = 'Northern Mods Pepper Weapons',
identifiers = { 'license', 'discord' },
sprayMinHits = 1, -- skip sprays that hit nobody (0 = log every spray)
minHits = 1, -- skip launcher volleys that hit nobody
events = { spray = true, shots = true, give = true, refill = true, rinse = true },
}
Config.Checks = {
enabled = true, -- check the settings and the setup on start (server console)
notifyAdmins = true, -- ... and tell admins in game when there are problems (the list in F8)
adminAce = 'command', -- who counts as an admin ('command': admins in server.cfg / txAdmin)
}nm_pepper/config_advanced.luaClick to expand
nm_pepper/config_advanced.lua--[[ Technical settings: animations, effects, props, integrations with other
scripts. Most servers never change these; config.lua has the settings
that matter. Anything here can also be set in config.lua (same place,
same name), and config.lua wins.
Times are in seconds here too. ]]--
local Advanced = {}
-- Resource names to look for (if yours are renamed). The first one running is used.
Advanced.FrameworkResources = {
esx = 'es_extended',
qb = { 'qb-core', 'qbx_core' },
ox_inventory = 'ox_inventory',
qb_inventory = { 'qb-inventory', 'ps-inventory', 'lj-inventory' },
}
-- ---------------------------------------------------------------------
-- The sprays: models, poses and the mist
-- ---------------------------------------------------------------------
Advanced.Weapons = {
WEAPON_PEPPERSPRAY = {
textEntry = 'WT_PEPPERSPRAY', -- the weapon's <HumanNameHash> in meta/weapons.meta
icon = 'pepperspray', -- icons/<icon>_white.png and stream/pepperspray_icons.ytd
particle = { scale = 0.9 }, -- overrides Spray.particle below
},
WEAPON_PEPPERSPRAY_RIOT = {
textEntry = 'WT_PEPPERSPRAY_RIOT',
icon = 'pepperspray_riot',
particle = { scale = 0.9 },
},
WEAPON_PEPPERGUN = {
textEntry = 'WT_PEPPERGUN',
gravity = 0.6,
interval = 0.25,
},
}
-- NPCs the launcher strikes react as to the spray; this clip is for
-- pepper_gun's own reactions, if the spray's can't be reached.
Advanced.NPC = {
coverEyes = { dict = 'anim@heists@ornate_bank@thermal_charge', name = 'cover_eyes_loop' },
}
Advanced.Cloud = {
tick = 0.5,
max = 64,
grow = 1.2,
startRadius = 0.6,
thinFrom = 0.5,
height = 1.6,
}
Advanced.Fx = {
burst = { asset = 'core', name = 'ent_sht_dust', scale = 1.6, color = { r = 1.0, g = 0.85, b = 0.55 } },
cloud = { asset = 'core', name = 'exp_grd_bzgas_smoke', scale = 0.22, color = { r = 1.0, g = 0.9, b = 0.7 }, alpha = 0.7 },
ballLook = { size = 0.02, trail = 0.8, color = { r = 255, g = 120, b = 20, a = 255 } },
decal = { type = 1030, size = 0.45, color = { r = 0.95, g = 0.8, b = 0.45 }, alpha = 0.85, lasts = 120 },
pod = true,
podLook = { range = 40.0, lasts = 15, max = 8 }, -- the reload's pod (Config.Fx.pod): seen this close, empty ones lie this long, at most this many
}
Advanced.Spray = {
hitInterval = 0.25, -- between hit checks while spraying
-- Player state keys that hold the spray back: an inventory that's open or busy.
-- (Any menu with the mouse, the pause menu, ox_target and qb-target always do.)
menuStateBags = { 'invOpen', 'invBusy', 'inv_busy' },
-- The mist (stream/nm_pepperspray.ypt): reach levels _100 to _400; tune with /sprayfx.
particle = {
asset = 'nm_pepperspray',
name = 'nm_pepperspray_mist_200',
scale = 0.6,
color = { r = 1.0, g = 1.0, b = 1.0 },
alpha = 1.0,
offset = vector3(0.0, 0.0, 0.0),
rotation = vector3(0.0, 90.0, 0.0), -- the muzzle bone's Z points down: turn +Z forward
},
}
-- ---------------------------------------------------------------------
-- Rinse items: how each is used (animation and props). An item in
-- config.lua uses the style named like it, or `style = '<name>'`.
-- ---------------------------------------------------------------------
Advanced.RinseStyles = {
saline = {
anim = { dict = 'nm_pepperspray_rinse', name = 'saline_self', seated = 'saline_self_seated', duration = 5 },
prop = 'bottle',
},
pepperspray_wipes = {
anim = { dict = 'nm_pepperspray_rinse', name = 'wipe_self', seated = 'wipe_self_seated', duration = 3 },
prop = { model = 'nm_ps_wipe', bone = 57005 },
message = 'wiped_self',
},
decon_kit = {
anim = { dict = 'nm_pepperspray_rinse', name = 'decon_self', seated = 'decon_self_seated', duration = 8 },
prop = 'bottle',
groundProp = { model = 'nm_ps_decon_kit', forward = 0.45, right = 0.25 },
},
}
-- ---------------------------------------------------------------------
-- Being sprayed
-- ---------------------------------------------------------------------
-- curve: how much faster the burning wears off when fully affected than at
-- the very end (6 = strong exposure eases quickly, the last of it lingers;
-- 1 = steady). `lasts` in config.lua stays right either way.
Advanced.Exposure = {
curve = 6.0,
restrictions = {
curve = 4.5,
effects = { 'noSprint', 'noJump', 'noAim', 'stumble', 'ragdoll', 'vehicleSwerve' },
},
}
-- fadeBelow: below this exposure the effect fades out, down to nothing at
-- its minExposure (1.0 = the last ~20 seconds of a dose, 0.25 = ~5 seconds).
Advanced.Effects = {
blur = { fadeBelow = 0.25, timecycle = 'hud_def_blur' },
shake = { fadeBelow = 1.0, name = 'DRUNK_SHAKE' },
screenFx = { name = 'DrugsMichaelAliensFight' },
blink = { everyMin = 2.5, everyMax = 7.0, duration = 0.35 },
face = { sprayed = 'mood_sleeping_1', affected = 'mood_injured_1' },
stumble = { clipset = 'move_m@injured' },
ragdoll = { duration = 3 },
vehicleSwerve = { every = 2.5 },
coughSounds = {
cough = 19, wheeze = 18, -- PLAY_PAIN sounds for NPCs
wheezeChance = 0.3,
coverEvery = { 0.9, 1.7 }, -- between coughs while covering the eyes
cues = { 0.027, 0.296, 0.403, 0.456, 0.726, 0.832, 0.885, 0.973 }, -- the loop's coughs
recordings = { -- players' coughs (html/sounds/), one voice per player
male = {
{ 'cough_m_1', 'cough_m_2', 'cough_m_3', 'cough_m_4', 'cough_m_5' },
{ 'cough_m_6', 'cough_m_7', 'cough_m_8' },
},
female = {
{ 'cough_f_1', 'cough_f_2', 'cough_f_3', 'cough_f_4', 'cough_f_5', 'cough_f_6' },
},
},
},
coverEyes = {
holdAfterHit = 1.2, -- the hands stay up this long after the last hit
anim = { dict = 'anim@heists@ornate_bank@thermal_charge',
intro = 'cover_eyes_intro', loop = 'cover_eyes_loop', exit = 'cover_eyes_exit' },
},
eyeFidgets = {
minGap = 0, maxGap = 0, maxInRow = 2,
afterRestrictions = { -- once the restrictions are over: a quick cough now and then
enabled = true, dict = 'nm_pepperspray_victim', name = 'cough_quick',
every = 15, coughs = { 0.22, 0.67, 0.89 }, -- coughs: where in the clip
},
clips = {
{ dict = 'nm_pepperspray_victim', name = 'contaminated', loop = true },
},
},
vehicle = { -- the seated copies played in vehicles
clips = {
['anim@heists@ornate_bank@thermal_charge'] = {
cover_eyes_intro = { 'nm_pepperspray_victim', 'cover_eyes_intro_seated' },
cover_eyes_loop = { 'nm_pepperspray_victim', 'cover_eyes_loop_seated' },
cover_eyes_exit = { 'nm_pepperspray_victim', 'cover_eyes_exit_seated' },
},
nm_pepperspray_victim = {
contaminated = { 'nm_pepperspray_victim', 'contaminated_seated' },
cough_quick = { 'nm_pepperspray_victim', 'cough_quick' },
},
},
},
}
Advanced.Signs = {
snot = { asset = 'nm_pepperspray', name = 'nm_pepperspray_snot', scale = 1.0,
bone = 31086, points = { vector3(0.021, 0.112, 0.0) } }, -- under the nose, on the head bone
sweat = { max = 100.0 },
}
Advanced.CrossContamination = {
npcs = true, -- NPCs in the cloud react too
notify = true, -- tell the sprayer when the wind blows it back
haze = { at = 0.7, drift = 0.25 }, -- where the cloud sits (share of the range), drift per m/s of wind
wind = { minSpeed = 4.0, angle = 50.0 },
}
-- ---------------------------------------------------------------------
-- Rinsing
-- ---------------------------------------------------------------------
Advanced.Decon = {
helpedAnim = { dict = 'nm_pepperspray_rinse', name = 'rinsed', duration = 5 },
helper = {
anim = { dict = 'nm_pepperspray_rinse', name = 'pour_other', duration = 5 },
standOff = 0.5, -- metres the helper stands from the other player
prop = { model = 'nm_ps_saline_pour', bone = 57005 },
downStateBags = { 'isDead', 'dead' }, -- player state keys ambulance scripts set when down
},
selfRinse = {
promptAt = { x = 0.5, y = 0.93, scale = 0.4 }, -- where "Press J" shows
},
bottle = { model = 'nm_ps_saline', bone = 57005, offset = vector3(0.0, 0.0, 0.0), rotation = vector3(0.0, 0.0, 0.0) },
}
-- ---------------------------------------------------------------------
-- Integrations
-- ---------------------------------------------------------------------
-- How a cuffed player is recognised (their reaction clips then stay off).
Advanced.Cuffs = {
native = true, -- GTA's handcuff flag
anims = {
{ dict = 'mp_arresting', name = 'idle' },
{ dict = 'anim@move_m@prisoner_cuffed', name = 'idle' },
},
stateBags = { 'isCuffed', 'cuffed', 'handcuffed', 'isHandcuffed' },
coughEvery = { 2.5, 4.5 },
}
Advanced.Refill = {
key = 38, -- the control that refills at a point (38 = E)
}