Skip to content

np_faction v0.1.0 ​

Jobs and factions for FiveM, built on the Nimbus UI design system. np_faction runs on top of the framework's job system and adds what the framework does not have: multi-job, a duty clock with shifts and payroll, ranks with permission nodes, certifications, faction bank accounts in np_banking, places, armory, lockers, a fleet, recruiting, a board and a phone app. Every faction is configured in files or in game through the np_admin staff editor.

The framework stays the source of truth for the active job. np_faction writes it through ESX setJob, qbx AddPlayerToJob / SetPlayerPrimaryJob and qb SetJob / SetJobDuty, so esx:setJob, QBCore:Server:OnJobUpdate and every script that only knows the framework keep working. Job changes other scripts or admin commands make are adopted into the roster. Duty is np_faction's: characters log in off duty, and a duty flag another script flips in the framework passes the same rules as np_faction's own switch.

It runs on es_extended, qbx_core or qb-core, or standalone with its own job state, with np_inventory, ox_inventory or qb-inventory. es_extended with np_inventory and np_banking is the first target. The only hard dependency is oxmysql. Staff rights are np_admin permission nodes, with a fallback to framework admin groups, an identifier list and np_discord roles. No ACE anywhere. The UI ships in English and German and follows the server theme from np_admin.

Faction HQ overview: on duty, members, balance, your week, the board and quick actions

Members Bank
Members Bank
Duty Staff editor (np_admin)
Duty Staff editor

The screenshots come from the browser mock of the web UI at 1920 × 1080. All sixteen are on Screenshots.

Principles ​

  • The framework keeps working. The active job is a normal framework job; np_faction only adds to it. Turn np_faction off and every job is still there.
  • Every job is a faction from the start. Framework jobs without a faction file are mirrored automatically with a template, so nothing has to be set up before the first restart. Staff then tune them in the editor.
  • Files or in game. A faction can be a file in shared/factions/, created in the staff editor, or both: the editor overrides the file, Reset to file brings the file back.
  • Never a hard dependency. Other resources check GetResourceState('np_faction') at call time and fall back to the framework when it is not running (Integrations).
  • Server-authoritative. Every action is checked on the server again: membership, status, grade, node, certification, duty and distance. Whatever can create money (server-paid wages, the government grant) is staff only, and rank salaries are capped at Config.Faction.maxSalary.

At a glance ​

Area What you get
Factions Four types (government, business, organisation, club) with templates. Link modes mirror (an existing framework job), create (np_faction writes the job into the framework) and none (clubs and organisations that never touch the framework job)
Members Hire (optionally as an offer the player accepts), fire, promote and demote with a hierarchy guard, probation, leave, suspension, callsigns, command notes, a discipline record. Works for offline characters
Multi-job Up to Config.MultiJob.slots framework-linked jobs plus unlimited clubs. One is the active framework job; switching is blocked on duty and has a cooldown. A faction can be set to be held alone
Ranks & nodes Dotted permission nodes per grade (members.hire, bank.withdraw with a daily limit, assets.garage.air …), wildcards, certifications that add nodes per member, a permission matrix editor, framework sync both ways
Duty & payroll A shift log for every duty change, AFK / zone / uniform / max-length rules (AFK checked against what the server sees with OneSync), units, pay per hour, salary, task or a mix, one paid shift per character at a time, a payroll timer that pays from the faction's payroll account, a salary cap, weekly quotas, a coverage heatmap, a shift planner
Faction money Accounts per purpose (operating, payroll, evidence, budgets) in np_banking or np_faction's own ledger, daily budgets per rank, two signatures above a threshold, auto rules, np_payments invoices and terminals, shims for esx_addonaccount, esx_society and qb-management whose boss-menu moves pass the same budget and signatures, a one-time migration of the old society money
World Places per type (duty point, locker room, armory, stash, evidence, boss office, garage, helipad, spawn, crafting, door, plus types other resources register), armory loadouts with registered serials, locker outfits, a fleet with plates, a model allowlist, take-home cars, impound, repairs and fuel billed to the faction (both capped)
Recruiting Application forms with versions, auto-requirements (playtime, licences, age, an MDT hook), a pipeline (new, interview, trial, decision) with notes, scores, votes and interview slots, open factions you join on the spot, a job centre clerk
Board Announcements with pins, expiry, minimum grade, read receipts and automatic posts for hires and promotions
Phone app Faction in np_phone's App Store (Home, Roster, Board, Shifts, Jobs, Bank from the home page), a shift Live Activity in the Dynamic Island; the same pages as a tablet without np_phone
Staff editor The faction list, the create / edit wizard, the audit log, moderation and faction money corrections, through np_admin (Staff editor & np_admin)

Faction HQ and the phone app ​

/faction opens the Faction HQ of the active job (or /faction <id> for another one you hold). The window is centred and fits every screen from 720p to ultrawide, 5:4 included. Its tabs follow the player's nodes:

Tab Shows
Overview On duty now, members, balance, your week against the quota, the board, quick actions
Members The roster with search and filters, member detail, hire, promote, status, callsign, notes, discipline
Ranks The grade ladder, the permission matrix, certifications, framework sync
Bank Accounts, transactions, approvals, budgets per rank, auto rules (np_banking)
Duty Who is on duty, the coverage heatmap, hours this week, the duty rules and pay model, the shift plan
Places The faction's places on the map, the placement tool, the boss budget
Fleet Vehicles, garages, take-home cars, impound and repairs
Applications The pipeline, interview slots, votes, the form editor
Board Announcements, pins, read receipts
Settings Identity, features and the numbers a boss may change

The Faction app on np_phone carries the member's side: the duty switch, the roster, the board, shifts and the paycheck, the jobs board, and the bank as a quick action. Without np_phone the same pages open as a tablet (/factionapp, a key mapping or the faction_tablet item).

Phone: home Phone: shifts
Phone home Phone shifts

Who uses it ​

np_faction calls these resources when they run (Integrations):

Resource What np_faction does with it
np_admin Staff permission nodes, the settings page Factions, staff tools, the audit log (category np_faction), the server theme
np_banking Faction accounts: the operating account is the job's society account, extra accounts per purpose
np_payments Invoices and fines in the faction's name, a terminal per faction, the invoice share rule
np_phone The Faction app, notifications, badges, the shift Live Activity, calendar invites, mail
np_inventory Armory, stashes, evidence and personal lockers, the tablet item
np_hud / np_menu Toasts, prompts and progress; radial entries and the F1 duty switch
np_clothing Uniforms, the faction locker, the uniform duty rule
np_discord Grade and duty roles, log channels, staff by Discord role

And these resources honour np_faction through their own adapter: multi-job checks, duty lists, permission nodes and faction accounts. np_banking, np_payments, np_hud, np_menu, np_admin, np_discord, np_inventory, np_clothing, np_gangs, np_drugs, np_cctv, np_shops, np_fuel and more than twenty others are listed on Integrations.

Quick example ​

lua
-- server: is this player police or sheriff (sergeant or higher), on duty, in any of their jobs?
if GetResourceState('np_faction') == 'started' then
  local ok, job = exports.np_faction:HasJob(src, { police = 4, sheriff = 4 }, nil, true)
  if ok then print(job.label, job.gradeLabel, job.callsign) end
end

-- server: may they spend faction money, and how much per day?
local can, limit = exports.np_faction:Can(src, 'police', 'bank.spend')

-- server: pay a task to the running shift (paid by the next payroll)
exports.np_faction:registerPayTask('tow_delivery', { label = 'Tow delivery', amount = 150, type = 'business' })
exports.np_faction:PayTask(src, 'mechanic', 'tow_delivery')

See Exports & hooks and Events & state bags.

Next steps ​