Skip to content

Configuration ​

Everything is in config.lua. It is a shared file, loaded on the client and the server. The server uses Config.Fire.maxRange, Config.Fire.relayRange, Config.Weapons, Config.Prone.weaponClasses and Config.Server to validate shots.

General ​

lua
Config.Locale = 'en'            -- 'en' | 'de'
Config.Debug = false            -- prints transitions, clip picks and shot results to F8
Config.Framework = 'auto'       -- 'auto' | 'esx' | 'qbx' | 'qb' | 'standalone'
Config.UseNpHud = 'auto'        -- 'auto' | true | false
Config.UseNpInventory = 'auto'  -- 'auto' | true | false
Key Default Description
Locale 'en' 'en' or 'de'. Missing keys fall back to English
Debug false Debug prints to F8 and the server console. Also registers the test kit commands
Framework 'auto' Only used for dead, downed and cuffed checks and character logout. 'auto' takes the first started of es_extended, qbx_core, qb-core. A forced framework that is not started falls back to standalone with a warning
UseNpHud 'auto' 'auto' and true use np_hud while it runs. false always uses the built-in pill, key strip and GTA feed notifications
UseNpInventory 'auto' 'auto' and true use np_inventory while it runs (drawn weapon, jam state, reload). false reads the ped's weapon and reloads with the built-in timed reload

Keys ​

lua
Config.Keys = {
  crouch = 'LCONTROL',   -- stand <-> crouch; from prone straight to crouch
  prone = 'Z',           -- stand/crouch -> prone (dives at a sprint); from prone back to where you came from
  holdToStandMs = 400,   -- hold the prone key this long to stand up fully from prone
}

These are the RegisterKeyMapping defaults. Players rebind them in the pause menu, see Controls → Rebinding.

Crouch ​

lua
Config.Crouch = {
  enabled = true,
  replaceStealth = true,
  keepWalkstyle = true,
  moveRate = 1.0,
  allowAim = true,
}
Key Default Description
enabled true false removes crouch and its key mapping
replaceStealth true The crouch key suppresses GTA's duck / stealth control while it is held, so LCONTROL crouches instead of entering stealth mode
keepWalkstyle true Restore the player's walk style on exit (from SetWalkstyle, then np_menu's getWalkstyle(), then the np_menu:reapplyWalk event). false just resets the movement clipset
moveRate 1.0 Movement speed multiplier while crouched
allowAim true Normal GTA aiming and firing while crouched. false disables aim and attack while crouched

Prone ​

lua
Config.Prone = {
  enabled = true,
  diveFromSprint = true,
  crawlTurnSpeed = 1.2,
  allowBack = true,
  shrinkCapsule = true,
  capsuleRadius = 0.25,
  blockOnSlopeDeg = 35.0,
  -- prone fire
  weaponClasses = { sniper = true, rifle = true, mg = true, smg = false, shotgun = false, pistol = false },
  aimArc = 40.0,
  fireArc = 12.0,
  bodyTurnRate = 90.0,
  vanillaPitch = { min = -12.0, max = 18.0 },
  firePitchTolerance = 6.0,
  bucketHysteresis = 2.0,
  deployTimeMs = 450,
}
Key Default Description
enabled true false removes prone, crawl and prone fire
diveFromSprint true Pressing the prone key while running or sprinting plays a dive into prone
crawlTurnSpeed 1.2 Degrees per frame (at 60 fps, frame-rate independent) when steering while crawling or turning on the back
allowBack true SPACE rolls onto the back and back to the front
shrinkCapsule true Shrinks the collision capsule every frame while prone (SetPedCapsule), so a prone player fits under low gaps. Not verified in game yet (test Q6)
capsuleRadius 0.25 Capsule radius while prone
blockOnSlopeDeg 35.0 Prone is refused on steeper ground
showHints true false hides the crawl key hints that show for the first three prone entries of a session
weaponClasses sniper, rifle, mg Classes that may deploy and fire prone. Classes come from Config.Weapons
aimArc 40.0 Degrees the aim may lead the body before the body turns
fireArc 12.0 A shot is only allowed when aim and body heading are within this many degrees, so what others see matches the shot
bodyTurnRate 90.0 Degrees per second the body turns to follow the aim
vanillaPitch −12 … 18 Aim pitch range when the active pose pack has a single pitch bucket (the vanilla pack)
firePitchTolerance 6.0 With a multi-bucket pose pack: max degrees between the aim pitch and the active bucket for a shot. Also widens the camera's pitch range past the first and last bucket
bucketHysteresis 2.0 Degrees past a bucket boundary before the pose switches, so it doesn't flicker
deployTimeMs 450 Settle time after deploying before the first shot

See Prone fire & sync for how the arcs and buckets work together.

Camera ​

Used while deployed. Sniper class: a scope at the eye. Other classes: rifleView.

lua
Config.Camera = {
  eyeOffset = { x = 0.0, y = 0.12, z = 0.06 },
  shoulderOffset = { x = 0.45, y = -0.9, z = 0.35 },
  rifleView = 'eye',
  rifleFov = 50.0,
  scopeFovMax = 30.0,
  scopeFovMin = 4.0,
  scopeZoomStep = 4.0,
  sensitivity = 6.0,
  holdBreathMs = 4000,
  holdBreathCooldownMs = 3000,
}
Key Default Description
eyeOffset 0, 0.12, 0.06 Metres from the head bone (right, forward, up) for the scope and the eye view
shoulderOffset 0.45, −0.9, 0.35 Metres from the ped (right, forward, up) for rifleView = 'shoulder'
rifleView 'eye' 'eye' (first person at the head) or 'shoulder' for non-sniper classes
rifleFov 50.0 Field of view for the eye / shoulder view
scopeFovMax / scopeFovMin 30.0 / 4.0 Scope zoom range (field of view). The scope shows magnification relative to scopeFovMax
scopeZoomStep 4.0 FOV change per scroll step
sensitivity 6.0 Degrees per mouse input unit at rifleFov. Scales with the FOV, so zoomed in is slower
holdBreathMs 4000 How long LSHIFT steadies the scope sway
holdBreathCooldownMs 3000 Cooldown after the breath runs out. Letting go early gives a shorter cooldown

The scope hides the shooter's own ped and weapon locally. Other players still see them.

Fire ​

lua
Config.Fire = {
  method = 'auto',
  maxRange = 1200.0,
  muzzleClearance = 0.6,
  relayRange = 250.0,
  remoteFx = {
    enabled = true,
    windowMs = 150,
    flashAsset = 'core',
    flashName = 'muzzle_flash_rifle',
  },
  reloadMs = { sniper = 2600, rifle = 2200, mg = 3800 },
}
Key Default Description
method 'auto' 'ped': the ped's real weapon (SetPedShootsAtCoord). 'bullet': a scripted bullet from the muzzle (ShootSingleBulletBetweenCoordsIgnoreEntityNew). 'auto': starts with ped and switches to bullet for the session if a shot breaks the pose or does not fire. See Shot
maxRange 1200.0 Metres. Aim ray length, and the server's max distance between the reported muzzle and impact
muzzleClearance 0.6 Metres. Something solid this close in front of the muzzle shows Muzzle blocked and the trigger only clicks
relayRange 250.0 Metres. Players within this range of the shooter get the server relay for the muzzle flash
remoteFx.enabled true Play the relay muzzle flash on remote clients
remoteFx.windowMs 150 If the shooter's ped already showed a real shot within this window, the relay flash is skipped (no double flash)
remoteFx.flashAsset / flashName core / muzzle_flash_rifle Particle used for the relay flash and for the shooter's own flash in bullet mode
reloadMs sniper 2600, rifle 2200, mg 3800 Reload time per class while deployed. Classes not listed use 2400

Weapons ​

lua
Config.Weapons = {
  groups = {
    [-1212426201] = 'sniper',   -- GROUP_SNIPER
    [970310034] = 'rifle',      -- GROUP_RIFLE
    [1159398588] = 'mg',        -- GROUP_MG
    [-957766203] = 'smg',       -- GROUP_SMG
    [860033945] = 'shotgun',    -- GROUP_SHOTGUN
    [416676503] = 'pistol',     -- GROUP_PISTOL
  },
  overrides = {
    -- weapon_marksmanrifle = 'sniper',
    -- weapon_musket = false,     -- false = never allowed prone
  },
  classes = {
    sniper = { minShotIntervalMs = 700, spread = 0.05, recoil = 2.4, recoilYaw = 0.4, recoilReturn = 6.0, sway = 0.9, scoped = true },
    rifle  = { minShotIntervalMs = 90,  spread = 0.55, recoil = 0.55, recoilYaw = 0.25, recoilReturn = 9.0, sway = 0.15, scoped = false },
    mg     = { minShotIntervalMs = 70,  spread = 0.8,  recoil = 0.45, recoilYaw = 0.3, recoilReturn = 10.0, sway = 0.1, scoped = false },
    smg    = { minShotIntervalMs = 60,  spread = 1.0,  recoil = 0.5,  recoilYaw = 0.35, recoilReturn = 10.0, sway = 0.1, scoped = false },
  },
}
  • groups: GetWeapontypeGroup hash → class. Signed and unsigned hashes both work.
  • overrides: weapon name (weapon_marksmanrifle or marksmanrifle) → class, or false to never allow it prone. Overrides win over groups. They work with and without np_inventory.
  • classes: tuning per class. Missing keys use the defaults below.
Field Default Description
minShotIntervalMs 100 Minimum time between shots. The server enforces it too (minus Config.Server.intervalSlackMs)
spread 0.5 Degrees of random spread per shot
recoil 0.5 Degrees of upward camera kick per shot
recoilYaw 0.25 Degrees of random sideways kick
recoilReturn 8.0 How fast the kick returns to the aim point
sway 0.2 Camera sway amount. The scope sway is reduced while holding breath
scoped false Use the scope camera. The sniper class always does

Sniper class is semi-automatic (one shot per click). Every other class fires while the trigger is held, limited by minShotIntervalMs.

Animations ​

Every slot is a list of { dict, clip } candidates. The first one whose dictionary exists, loads and has the clip wins, so a missing clip degrades to the next candidate instead of erroring. /ccs_check prints which candidate resolves on your client.

lua
Config.Anims = {
  crouchClipset = { 'move_ped_crouched' },
  crouchStrafe = { 'move_ped_crouched_strafing' },
  standToProne = { { 'amb@world_human_sunbathe@male@front@enter', 'enter', startPhase = 0.0, ms = 3000 } },
  crouchToProne = { { 'amb@world_human_sunbathe@male@front@enter', 'enter', startPhase = 0.3, ms = 1500 } },
  dive = { { 'move_jump', 'dive_start_run', ms = 1100 }, { 'explosions', 'react_blown_forwards', ms = 1100 } },
  proneToCrouch = { { 'get_up@directional@transition@prone_to_knees@crawl', 'front', ms = 780 } },
  kneesToStand = { { 'get_up@directional@movement@from_knees@standard', 'getup_l_0', ms = 1300 } },
  backToSeated = { { 'get_up@directional@transition@prone_to_seated@crawl', 'back', ms = 950 } },
  seatedToStand = { { 'get_up@directional@movement@from_seated@standard', 'get_up_l_0', ms = 1300 } },
  crawl = { dict = 'move_crawl' },                 -- onfront_fwd / onfront_bwd / onback_fwd / onback_bwd
  turn = { dict = 'move_crawlprone2crawlfront' },  -- left / right / back
  flipToBack = { { 'get_up@directional_sweep@combat@pistol@front', 'front_to_prone', ms = 1000 } },
}
Candidate field Description
[1] / dict, [2] / clip Animation dictionary and clip
startPhase / phase Start phase (0–1)
ms Play time in ms when the clip duration can't be read
speed Playback speed. 0 holds a single frame (used by the vanilla pose fallback)

crouchClipset and crouchStrafe are lists of movement clipsets. crawl and turn are single dictionaries with fixed clip names.

Pose packs ​

What other players see while you are deployed: one looping clip per pitch bucket.

lua
Config.Poses = {
  active = 'vanilla',
  packs = {
    vanilla = {
      buckets = {
        { pitch = 0.0, candidates = {
          { 'missfbi3_sniping', 'prone_michael' },
          { 'missfbi3_sniping', 'prone_dave' },
          { 'move_crawl', 'onfront_fwd', phase = 0.0, speed = 0.0 },
        } },
      },
      fire = nil,     -- optional { dict, clip } upper-body additive played per shot
      reload = nil,   -- optional { dict, clip } upper-body reload
    },
  },
}
Key Description
active Name of the pack in packs to use. Falls back to vanilla if the name doesn't exist
packs.<name>.buckets List of { pitch = degrees, candidates = { … } }. One bucket = no visible pitch
packs.<name>.fire Optional upper-body clip played on each shot
packs.<name>.reload Optional upper-body clip played on reload

How to add a streamed pack with real pitch: Prone fire & sync → Pose packs.

Stealth ​

lua
Config.Stealth = {
  enabled = true,
  noise = { stand = 1.0, crouch = 0.45, prone = 0.15 },
  footsteps = { crouch = true, prone = false },
}
Key Default Description
enabled true false leaves the noise multipliers alone
noise 1.0 / 0.45 / 0.15 SetPlayerNoiseMultiplier and SetPlayerSneakingNoiseMultiplier per stance. Lower is harder for NPCs to notice. Re-applied every 200 ms while not standing, reset when standing
footsteps crouch on, prone off false makes footsteps quiet in that stance

These affect NPCs only. Other players hear what the game plays.

Server ​

Checks on reported prone shots. A failed check is logged and the shot is not relayed. It never undoes the shot itself (damage is done by the game on the shooter's client).

lua
Config.Server = {
  originTolerance = 4.0,
  intervalSlackMs = 25,
  burst = { size = 30, refillMs = 2500 },
  log = 'print',
}
Key Default Description
originTolerance 4.0 Metres between the reported muzzle and the player's server-side position
intervalSlackMs 25 Allowed jitter on the per-class minShotIntervalMs
burst 30 tokens / 2500 ms Token bucket per player: size shots, refilled fully over refillMs. Full-auto rifles need room; the per-class interval still caps the rate
log 'print' 'print': console line (at most one per second per player). 'event': TriggerEvent('np_ccs:suspicious', src, reason, shot) on the server for your own logging or anticheat. false: silent

See Server validation for the list of checks and reasons.

Compat ​

Interop with resources written for MadsLeander's crouch_crawl.

lua
Config.Compat = {
  crouchCrawlAlias = true,
  legacyEvents = true,
  legacyStateBags = true,
}
Key Default Description
crouchCrawlAlias true Answer exports.crouch_crawl:IsPlayerProne() and the other crouch_crawl exports while crouch_crawl itself isn't running
legacyEvents true Also fire crouch_crawl:onCrouch and crouch_crawl:onCrawl
legacyStateBags true Also publish isProne and isCrouched

See Compatibility → crouch_crawl.

CanUseStance ​

lua
Config.CanUseStance = function(stance) return true end

Runs on the client before every change to 'crouch' or 'prone'. Return false to refuse (the player gets "You're not allowed to do that here."). It is never asked for 'stand', so a player can always get up.

lua
-- no prone inside the hospital
Config.CanUseStance = function(stance)
  if stance ~= 'prone' then return true end
  return #(GetEntityCoords(PlayerPedId()) - vector3(311.2, -592.9, 43.3)) > 40.0
end

For a temporary block from another resource, use BlockStance instead.