Installation ​
Requirements ​
- A recent FiveM server artifact (Lua 5.4)
- oxmysql, the only hard dependency
- Node 18+ only if you change the web UI (
web/distis committed)
Optional, auto-detected at start:
| Kind | Resources | Used for |
|---|---|---|
| Framework | qbx_core, qb-core, es_extended | Character id, name, gender, money, jobs and gangs, jail state. Without one, np_tattoos runs standalone |
| Inventory | ox_inventory (also np_inventory), qb-inventory (and ps-inventory / lj-inventory), the ESX inventory |
The three usable items |
| Target | ox_target, qb-target |
Parlour zones. Without one, a marker and an [E] prompt |
| Characters | np_character |
Re-applies ink after its stores; the character id in standalone |
| Identification | np_identification |
Distinguishing marks provider (see Distinguishing marks) |
| Staff | np_admin | Permission nodes, live settings, log forwarding and staff actions |
Steps ​
- Put the resource in
resources/asnp_tattoos. The NUI callbacks usehttps://np_tattoos/…, so keep the name. - The NUI is prebuilt in
web/dist. Rebuild it only after changing the web UI:shcd web && npm ci && npm run build - Database: with
Config.AutoCreateTables = true(the default) the tables are created at start. Otherwise importsql/np_tattoos.sqlyourself. See Bridges → Tables. - Add the three items to your inventory (see Items below).
- Start it after oxmysql, the framework, the inventory and the target resource, because the bridges are picked
once at start:cfg
ensure oxmysql ensure qbx_core # or qb-core / es_extended (optional) ensure ox_inventory # optional ensure ox_target # optional ensure np_character # optional ensure np_admin # optional: permissions, settings, logs, staff tools ensure np_tattoos - Give your staff the
np_tattoos.adminnode in np_admin. It unlocks/inkadmin(design review). There are noadd_acelines; see Permissions. - Optional: a Discord webhook for purchases, removals, cover-ups and every moderation action. Use
set, notsetr, so clients never see it:cfgThe convar wins overset np_tattoos_webhook "https://discord.com/api/webhooks/…"Config.Logs.webhook. Onlyhttps://URLs are used. While np_admin runs, the same logs also go to its audit log (categorynp_tattoos).
Test it
Walk into a parlour (the blip with the tattoo icon, for example Vespucci Canals) and open it with the target or [E].
Pick a zone, add a design to the basket and pay. The piece shows as healing in "Your ink". As an admin, /inkadmin
opens the design review.
Items ​
| Item | Config key | What it does when used |
|---|---|---|
tattoo_ointment |
Config.Healing.ointmentItem |
Every healing piece without ointment heals faster. One item per use, only consumed when something was healing |
prison_ink_kit |
Config.Prison.kitItem |
Opens the prison parlour (jailed players only). Each piece inked consumes one kit |
henna_kit |
Config.Temporary.kitItem |
Opens the self-service temporary parlour. Each piece consumes one kit |
Items are never consumed by the inventory itself: np_tattoos removes them once the use actually did something.
ox_inventory ​
Add the items to ox_inventory/data/items.lua with a server export, and consume = 0:
['tattoo_ointment'] = {
label = 'Tattoo ointment', weight = 100, consume = 0,
server = { export = 'np_tattoos.tattoo_ointment' },
},
['prison_ink_kit'] = {
label = 'Prison ink kit', weight = 200, consume = 0,
server = { export = 'np_tattoos.prison_ink_kit' },
},
['henna_kit'] = {
label = 'Henna kit', weight = 150, consume = 0,
server = { export = 'np_tattoos.henna_kit' },
},
The export names follow the item names. If you rename an item in the config, rename the export too.
qb-inventory and ESX ​
Add the three items to qb-core/shared/items.lua (qb / qbx with qb-inventory) or to the ESX items table. np_tattoos
registers them as usable with QBCore.Functions.CreateUseableItem or ESX.RegisterUsableItem.
Without any inventory the items are unavailable. Prison ink then only works without kits (Config.Prison.kitItem = false), see Prison ink.
Permissions ​
np_tattoos uses no ACE. Every check is a permission node, managed in np_admin: grant it to an np_admin group or a single player.
| Node | Grants |
|---|---|
np_tattoos.admin |
/inkadmin, the review RPCs, and the np_admin staff actions Tattoo moderation, Add tattoo and Remove all tattoos |
np_tattoos.submit |
Submit custom designs from the parlour, in addition to the jobs in Config.Moderation.submitters.jobs. Config.Moderation.submitters.permission = false ignores the node |
np_tattoos.job.<name>[.<grade>] |
Standalone only: job membership, for crew designs, submitters and /marks |
np_tattoos.gang.<name>[.<grade>] |
Standalone only: gang membership, for crew designs |
In standalone, grant np_tattoos.gang.ballas for Ballas grade 0 and add np_tattoos.gang.ballas.1 for grade 1 (the
highest granted grade up to 10 counts).
Without np_admin running, only these pass a check:
- the server console;
- identifiers in the convar
np_admin_fallback(set np_admin_fallback "license:abc…,discord:123…"); - on es_extended, the ESX groups in
np_admin_fallback_groups(defaultadmin,superadmin).
Troubleshooting ​
| Symptom | Fix |
|---|---|
| Blank UI | web/dist is missing. Build the NUI |
oxmysql is not started, ink can not be stored |
Start oxmysql before np_tattoos |
| "Tattoos need a freemode character." | Decorations only exist for mp_m_freemode_01 / mp_f_freemode_01. Ped models can't open a parlour |
| Ink disappears after changing clothes | Another resource cleared the decorations without an event np_tattoos listens to. Call exports.np_tattoos:apply() on the client after it (see Exports) |
| Using an item does nothing | ox_inventory: the server = { export = 'np_tattoos.<item>' } line is missing. qb / esx: the item is not in the items table |
| Money is not charged in standalone | Standalone has no economy: every payment succeeds. Use a framework for paid tattoos |
framework bridge "…" selected but resource "…" is … in the console |
Config.Framework names a framework that is not started |
Config.Crew.coverDesign.… is not in the catalogue warning |
A cover design name doesn't exist. Fix the name or add the design |
/inkadmin says "You are not allowed to do that." |
Grant the np_tattoos.admin node in np_admin. Without np_admin, add your identifier to np_admin_fallback (or, on ESX, use a group from np_admin_fallback_groups) |