Skip to content

Installation ​

Requirements ​

  • FiveM with Lua 5.4
  • oxmysql (required)
  • ESX is the first target. The core uses FiveM identifiers and does not require ESX exports for the city simulation.
  • np_jobs, np_faction, np_inventory, np_admin, np_environmental, np_dispatch, np_phone, np_prophandler, np_minigames and np_cellnet are optional adapters.

Install ​

  1. Put this resource in your resources folder as np_utilities.
  2. Ensure oxmysql starts first, then add ensure np_utilities to server.cfg.
  3. Startup creates and additively migrates the four np_utilities_* tables. sql/install.sql is also provided.
  4. Review shared/config.lua: the shipped districts/assets are a small Los Santos starter set.
  5. If np_faction is running, create the city faction and the department account purposes listed under Config.Faction.accounts. np_utilities does not create np_faction accounts.
  6. Add the utility.* feature ids to job definitions in np_jobs. The default permission node is feature.<feature id>; np_jobs resolves duty and faction rank permissions.

No ACE checks are used. The resource vendors the shared np_addon adapter and np_admin/lib/np_admin.lua; grant np_utilities.manage for staff tools.

Repair materials ​

Config.Inventory.requireRepairMaterials defaults to false. To consume materials, enable it and configure item IDs that exist in np_inventory. Inventory access is guarded; if materials are required and np_inventory is offline, a repair cannot consume them.

Orders and contractors ​

Residents can use /311 <category> <description> or the City Services app. Utility workers need the relevant feature and duty, then claim an order, remain at its site for the configured completion hold, and complete it. Linked assets must be operational. Optional second-worker verification is controlled by Config.WorkOrders.verification.requireSecondWorker.

When no qualified crew is online, the city contractor waits according to Config.WorkOrders.contractor.delayMinutes and charges the configured department account with a premium. If the account is short, the order stays blocked and is retried after funds are restored.

World effects ​

Config.World.outageBlackout uses SetArtificialLightsState; it is client-wide, so distant lights can also look dark for a player standing inside an affected district. District boundaries currently use circles, not np_colshape.