Items ​
np_metal-scanner adds the items below (Config.Items, each module adds its own). The metal values the scanners read
are separate and also apply to your own items, see Configuration → Metal.
np_inventory ​
Nothing to do. At start np_metal-scanner registers every item with exports.np_inventory:RegisterItem, with its use
callback np_metal-scanner.useItem (the wand, the claim ticket and the ground detector use it). np_inventory also
registers them again whenever it restarts. Change an item by editing its entry in Config.Items.
-- what np_metal-scanner registers for the wand
exports.np_inventory:RegisterItem('metal_wand', { label = 'Metal wand', description = 'Hand-held metal detector for secondary screening.',
weight = 400, stack = false, close = true, category = 'tool', icon = 'wand-magic',
metal = { mass = 14, class = 'tool' }, server = { export = 'np_metal-scanner.useItem' } })
A np_inventory definition may carry a metal field of its own ({ mass, class, zone }, or 0 for invisible): it is
read after Config.ItemMetal. Evidence is stored in np_inventory's evidence inventory type (one per case), lockers in
stashes npms_locker:<venue>:<owner>, the lost-and-found in npms_lostfound:<venue>, and the divest tray in a temporary
stash. Crafting recipes for the smuggling items and the detecting kit are in
install/crafting.np_inventory.lua.txt (paste them into a bench's recipes in np_inventory's crafting.lua; the
ingredient names are examples). See np_inventory → Compatibility.
ox_inventory ​
Items cannot be registered at runtime. Paste install/items.ox_inventory.lua.txt into ox_inventory/data/items.lua
(inside return { … }) and add images named <item>.png to ox_inventory/web/images. For the three items with a use
(metal_wand, locker_ticket, ground_detector) add the callback:
['metal_wand'] = { label = 'Metal wand', weight = 400, stack = false, close = true,
server = { export = 'np_metal-scanner.useItem' } },
Evidence is a stash npms_evidence:<case>. Item metadata and slots are supported, so wands keep their battery and tickets
their locker.
qb-inventory ​
Paste install/items.qb-inventory.lua.txt into qb-core/shared/items.lua (inside QBCore.Shared.Items = { … }) and
add <item>.png to the inventory's images. The usable-item callbacks are registered by np_metal-scanner itself. There
are no temporary stashes and no current weapon export, so the drawn weapon is read from the ped.
ESX inventory ​
The plain ESX inventory has no item metadata, no slots and no stashes. Items are still detected by name and
Config.ItemMetal, but serials and carry spots are off, and lockers and evidence keep a list in the database instead of
a stash (a case or locker is then the only copy of the items). Weapons live in the ESX loadout, which the gate reads
server-side. Use np_inventory for the full feature set.
No inventory ​
With Config.Inventory = 'none' (or no supported inventory started) no item is carried: the start-up report says so.
Gates and wands that need no item still read GTA loadout weapons (the loadout, the weapon in hand, the client
report) and body metal, and seizures are kept in the case record. The wand, the divest tray, claim tickets, evidence
stashes and the ground detector need an inventory.
The items ​
| Item | Label | Weight | Use | Notes |
|---|---|---|---|---|
metal_wand |
Metal wand | 400 g | Starts a wand sweep on the nearest person | Battery in the metadata (durability / battery, percent). Metal mass 25 (class tool) when carried |
locker_ticket |
Locker ticket | 5 g | Collects the locker, only at a locker point of that venue | Metadata { venue, locker, expires, label }. See Lockers |
seized_weapon |
Seized weapon | 1000 g | Not used | A GTA loadout weapon that was seized or put into a locker becomes this item with { weapon, hash, ammo, components, label, metal }, so it comes back exactly. Still metal for the next gate |
tray_weapon |
Tray weapon | 1000 g | Not used | A loadout weapon lying on a divest tray |
evidence_casing |
Shell casing evidence | 10 g | Not used | A casing found with the ground detector by police |
evidence_weapon |
Recovered weapon evidence | 1000 g | Not used | A dropped weapon found with the ground detector by police |
ground_detector |
Ground detector | 1500 g | Equips the ground detector | |
pinpointer |
Pinpointer | 200 g | Not used | Part of the detecting kit, sold by np_shops' Security Supply |
trowel |
Trowel | 300 g | Not used | Required to dig a find (police evidence needs none) |
find_* |
Eleven finds | 80 g each | Not used | find_pull_tab, find_bottle_cap, find_nail, find_foil, find_coin, find_jewellery, find_silver_ring, find_old_badge, find_war_medal, find_gold_nugget, find_rare_relic. Metadata { findId, quality, value, coords, time }; category collectible, sold to the buyer |
Smuggling items ​
| Item | Label | Weight | Effect |
|---|---|---|---|
lead_pouch |
Lead pouch | 900 g | shield = 1: hides the single largest metal item from gates and wands. The X-ray shows an impenetrable black mass, which is flagged |
ceramic_knife |
Ceramic knife | 180 g | Metal mass 0: invisible to gates, wands and the X-ray metal reading. Draws WEAPON_KNIFE when used; the class stays blade for the seized-evidence label |
polymer_pistol |
Polymer pistol | 500 g | Only registered when Config.Smuggling.polymerPistol = true: an item variant of WEAPON_PISTOL with no metal. A native WEAPON_PISTOL keeps its normal profile |
np_identification types ​
np_identification has no runtime type registration. Import the three types of install/np_identification_typedefs.json
one by one with /iddesigner → Import and publish them:
| Type | Used for |
|---|---|
security_license |
The security permit class: a guard's licence (180 days, issued by police or security from grade 3, needs an id_card, 18+, no warrant) |
detecting_permit |
The ground detector when Config.Ground.requirePermit is on (90 days, issued by police from grade 2 or at the city hall) |
implant_card |
A card for a medical implant, a believable reason for a body signal (no expiry, issued by ambulance from grade 2) |
weapon_license is np_identification's own built-in type (categories A for blades, B and C for firearms) and is not
redefined. See np_identification → Exports.