Installation ​
Requirements ​
- FiveM OneSync server with
oxmysqland a MySQL-compatible database. np_jobsto authorize staff workflows; without it those actions fail closed.np_inventoryfor badges and wristbands.- ESX is the first framework target. Character IDs are read from
np_characterwhen available, then ESX, then the FiveM license identifier.
Setup ​
- Copy the resource to your server resources folder and configure
oxmysql. - Run
sql/install.sql, or keepConfig.Security.AutoCreateTables = trueand allow the database user to create and alter the resource tables. - Ensure
oxmysql,np_jobs,np_doors,np_inventory, the relevant providers, and thennp_security. Optional integrations can start later; the resource registers with them when they become available. - Configure job compositions in
np_jobsusing the feature catalogue.security.detainalso requirespolice.cuff. - Register a venue site with a stable ID, bucket, and door coordinates. For venues, use
/securitydoornear the registered entrance to open the door tablet. - For CIT routes, register the configured
sourceStashanddestinationStashinnp_inventory, define load/unload stops inConfig.Security.CitRoutes, and restrict the route IDs with the job'ssecurity.cit.routesconfig. - Map housing property IDs and banking alarm locations to security site IDs in
Config.Security.AlarmSitesso active alarm contracts route those alarms to the security channel.
np_security does not fall back to framework job names or ACE. Its np_addon declarations are host discovery
metadata, not hard dependencies. Only oxmysql is a manifest dependency.
Venue example ​
lua
exports.np_security:registerSite({
id = 'galaxy', kind = 'venue', label = 'Galaxy', bucket = 4201,
door = { coords = { x = 350.0, y = 200.0, z = 100.0 }, radius = 3.0, bucket = 0 },
capacity = 250, capacityMax = 300, ageLimit = 18,
count = 'bucket', tiers = { entry = true, vip = true, staff = true },
})
For an outdoor entrance and interior, set door.bucket to the entrance bucket and site.bucket to the interior
bucket. The admission provider validates the guest's current bucket at the door; the venue resource moves them after
admission succeeds.
Commands ​
/securitydooropens the venue NUI after checking feature scope, routing bucket, and distance./securityhelpprints the action list./security <action> <json>calls a server-validated action, for example/security routes {"siteId":"galaxy"}.
The generic command is an operational interface, not an authorization bypass. Every action rechecks np_jobs on the
server.