Search Players
One Inventory lets a player search another player's inventory (the police "frisk" feature). There are two ways someone is allowed to search a target:
- By job - anyone whose job is in the allowed-jobs list can search anyone.
- By vulnerability - everyone else can only search a target that is in an enabled "vulnerable" state (dead, cuffed, hands up, or otherwise marked searchable).
Configuration
Configure it in the admin panel under Config -> Gameplay -> Search:
Vulnerable states
A target counts as vulnerable when an enabled state is active. Each state is driven differently:
| State | How it becomes active |
|---|---|
| Dead | One Inventory sets state.dead from your framework (ESX death / QB metadata.isdead). |
| Cuffed | One Inventory sets state.cuffed from your framework (QB metadata.ishandcuffed). |
| Hands up | Your hands-up script sets state.handsup, or the target plays a recognised hands-up animation. |
| Searchable | Any script sets state.searchable for "vulnerable for any reason". |
Dead, cuffed and hands up are also detected automatically when the target plays one of the built-in animations listed in Option 2.
Integrating a custom hands-up or vulnerability script
If you run a hands-up, restrain, or minigame script that should make a player searchable, you have two options. Use whichever fits your script.
Option 1: set the statebag
Set the matching state when your script makes the player vulnerable, and clear it when they're no longer vulnerable.
-- Generic "vulnerable for any reason" (any script):
-- Server
Player(src).state:set('searchable', true, true)
-- Client
LocalPlayer.state:set('searchable', true, true)
-- Hands-up specifically, if your script doesn't already set it:
LocalPlayer.state:set('handsup', true, true)
searchable and enable the "searchable" toggle).Option 2: play a recognised animation
One Inventory also detects a built-in set of animations. If your script plays one of these, the target is flagged automatically, with no statebag to set. These animations are fixed (not configurable); the matching toggle under Allow searching on still has to be enabled.
Cuffed
mp_arresting/idle
Dead
dead/dead_a
Hands up
missminuteman_1ig_2/handsup_basemissminuteman_1ig_2/handsup_enterrandom@mugging3/handsup_standing_base
