Skip to content

Compatibility ​

Every integration is optional, detected with GetResourceState, and called through pcall. Nothing has to be configured in the other resources.

Frameworks ​

Only used to know when a player can't change stance and when the character logs out. Config.Framework = 'auto' picks the first started of es_extended, qbx_core, qb-core.

Framework Dead / downed Cuffed Logout
ESX (es_extended) esx:onPlayerDeath / esx:onPlayerSpawn state bags esx:onPlayerLogout
qbx / qb PlayerData.metadata.isdead / inlaststand metadata.ishandcuffed QBCore:Client:OnPlayerUnload
Standalone state bags only state bags only np_character:unloaded

On every framework the common state bags count too: isDead, dead, downed, isDowned, inLastStand, handcuffed, isCuffed, cuffed. So does the engine: IsEntityDead, IsPedFatallyInjured, IsPedCuffed.

np_inventory ​

With np_inventory running (and Config.UseNpInventory not false):

What How
Drawn weapon exports.np_inventory:getCurrentWeapon(): the hash and the item name (the name is what Config.Weapons.overrides matches)
Holster np_inventory:currentWeapon with nil lowers a deployed weapon
Jams isWeaponJammed() is asked before each prone shot. Jammed: click and a message
Reload reloadWeapon() on R or an empty clip while deployed. Refills from ammo items, clears a jam, never plays the standing reload
Durability np_inventory counts prone shots from np_ccs:shotFired, once per shot, also when the scripted bullet fallback doesn't set IsPedShooting
No double reloads While proneDeployed is true, np_inventory skips its auto reload on an empty clip and its R key, and never calls MakePedReload (it breaks the pose)
Busy invOpen / invBusy refuse going down from standing and deploying
Weapon switching np_inventory draws and holsters itself. The resource never switches weapons by script, and only blocks native switching while prone when np_inventory isn't running

These hooks were added to np_inventory for this resource. With an older np_inventory, the jam check and the np_inventory reload are skipped (the built-in timed reload is used), and /ccs_check says so.

Without np_inventory, the weapon in the ped's hand is used, reload is the built-in timed reload from the native reserve, and there are no jams. With ox_inventory, holstering (ox_inventory:currentWeapon with nil) lowers a deployed weapon. Nothing else of ox_inventory is used.

np_hud ​

With np_hud running (and Config.UseNpHud not false):

  • Stance chip: np_hud reads the stance, proneType and proneDeployed state bags itself and shows a chip above the weapon card. See np_hud → Integration → Stance. Turn it off there with Config.Components.stance = false.
  • Key hints (crawl keys, deploy keys) go through ShowPrompt / HidePrompt.
  • Notifications (refusals, jams, no ammo) go through Notify.
  • An np_hud progress bar (IsProgressActive) refuses going down from standing.

The scope overlay and the crosshair are always the resource's own NUI. Without np_hud, the resource shows its own stance pill (bottom left), key strip and GTA feed notifications.

np_hud on foot with the stance chip, prone and deployed

np_hud web dev mode (?scene=foot&stance=deployed), mock data.

np_menu ​

  • Walk style: after crouching, the walk style comes back from exports.np_menu:getWalkstyle(), or through the np_menu:reapplyWalk event. Another walk style resource reports its clipset with SetWalkstyle.
  • Busy: an open np_menu (isOpen()) refuses going down from standing.
  • Emotes that clear the ped's tasks while deployed: the pose is put back within half a second. While crouched, the crouch clipset is re-applied every second if something reset it.

Other np_* resources ​

Resource What happens
np_phone Can't be opened while deployed (an addHook('open', …) veto). Fine while just prone or crouched. Its camera (isCameraActive()) refuses going down
np_character isBusy() refuses going down. np_character:unloaded stands the player up
np_tattoos isOpen() refuses going down
np_payments IsOpen() refuses going down
np_helicam IsFullscreen() (camera or live feed up) refuses going down
np_drugs The npd_overdose state bag blocks stances and stands the player up

"Refuses going down" means: a new crouch or prone from standing is refused while that UI is open. A player who is already crouched or prone stays there.

crouch_crawl ​

MadsLeander/crouch_crawl is a popular free crouch and crawl script. Scripts written for it keep working without changes:

crouch_crawl API Answered by np_crouch-crawl-shoot Setting
exports.crouch_crawl:IsPlayerProne() true while prone Config.Compat.crouchCrawlAlias
exports.crouch_crawl:IsPlayerCrawling() true while prone and moving crouchCrawlAlias
exports.crouch_crawl:IsPlayerCrouched() true while crouched crouchCrawlAlias
exports.crouch_crawl:GetPlayerProneType() 'onfront' / 'onback' crouchCrawlAlias
exports.crouch_crawl:StopPlayerProne(force) Stands up from prone crouchCrawlAlias
crouch_crawl:onCrouch (local event) Fired with true / false Config.Compat.legacyEvents
crouch_crawl:onCrawl (local event) Fired with true / false legacyEvents
LocalPlayer.state.isProne / isCrouched Published with the other bags Config.Compat.legacyStateBags
  • The exports.crouch_crawl:* aliases only exist while crouch_crawl is not running. The same functions are always available on this resource (exports['np_crouch-crawl-shoot']:IsPlayerProne()).
  • Don't run both. They bind the same kind of keys and would fight over the ped. If both are started, the client prints a warning and the aliases stay off.
  • Nothing is copied from crouch_crawl (it has no licence). Only the public API names are matched.