Exports ​
All exports are called as exports.np_tattoos:<name>(...).
Client ​
client
| Export | Returns | Description |
|---|---|---|
apply(ped?) |
number | nil |
Clear and re-apply the player's ink on ped (default: the player). Returns how many decorations were added, nil when skipped (not a freemode ped, ink not loaded yet). Call it after your resource cleared decorations |
getInk() |
Ink[] |
A copy of the player's ink |
isOpen() |
boolean |
true while the parlour or the review panel is open |
openParlour(shopId?) |
boolean |
Ask the server to open a shop. Without an id, the nearest shop within its radius. false when a UI is already open; true means requested (the server still checks the distance) |
lua
-- your clothing shop just reset the ped
exports.np_tattoos:apply()
-- don't open your UI over the parlour
if exports.np_tattoos:isOpen() then return end
Server ​
server
| Export | Returns | Description |
|---|---|---|
getInk(srcOrCid) |
Ink[] |
Ink of an online player (server id) or of a character (cid string, also offline). Hashes for the online player's gender, else male |
addInk(src, name, opts?) |
id | nil |
Ink a catalogue design on an online player. See below |
removeInk(src, id) |
boolean |
Delete a piece right away (no laser sessions). Fires np_tattoos:removed |
getDistinguishingMarks(srcOrCid, opts?) |
Mark[] |
Visible marks, see Distinguishing marks. opts.onlyVisible = false lists every zone |
hasCrewInk(src, crewName) |
boolean |
The character has a healed, unflagged crew piece of that crew |
openParlour(src, shopId?, mode?) |
boolean |
Open a parlour for a player without the distance check. mode: 'shop' (default; nearest shop without an id), 'prison' or 'temp'. Jail and kit rules still apply |
registerDesign(design) |
boolean |
Add or override a catalogue design at runtime, see Catalogue & packs |
setJailedProvider(fn) |
boolean |
fn(src) -> boolean decides who is jailed for prison ink. nil removes it; false when fn isn't callable |
addInk ​
lua
local id = exports.np_tattoos:addInk(src, 'fm_tat_029', {
variant = 'color', -- 'bw' (default) | 'color' | 'faded'
opacity = 0.8, -- 0.1 .. 1, default from the variant
free = true, -- default; false charges the variant price
account = 'bank', -- with free = false
kind = 'shop', -- override the design's kind
artist = 'Rico', -- stored on the piece
skipHealing = false, -- true = healed right away
})
- The design must be in the catalogue (disabled and shop-specific designs work too), the zone must have room, and the
design must have a hash for the player's gender. Otherwise
nil. - Unlike the parlour,
addInkdoesn't refuse a design the player already owns. - With
free = falseand not enough money,nil. The money is refunded if storing fails. - On success it fires
np_tattoos:inked, logs the piece and pushes the new ink to the client.
lua
-- a gang initiation in your own resource
if exports.np_tattoos:addInk(src, 'crew_ballas_bold', { skipHealing = true }) then
print('inked')
end
Ink ​
lua
{
id = 12, name = 'fm_tat_029', label = 'Trinity Knot', zone = 'ZONE_TORSO',
collection = 'multiplayer_overlays', hash = 'FM_Tat_M_029', -- for the gender; nil = none
variant = 'bw', -- 'bw' | 'color' | 'faded'
opacity = 1.0, -- 0.1 .. 1
kind = 'shop', -- 'shop' | 'crew' | 'custom' | 'temp' | 'prison'
state = 'healing', -- 'healing' | 'healed'
appliedAt = 1759500000, healsAt = 1759507200, -- unix seconds; healsAt only while healing
ointment = false, swam = false,
expiresAt = nil, -- temporary ink
artist = nil, shop = 'vespucci',
crew = nil, -- { label } for crew pieces
flagged = nil, -- { reason = 'crew_left', deadline }
removal = nil, -- { done, total, nextAt? } once a laser removal started
coveredFrom = nil, -- label of the covered piece
glyph = 'infinity', image = nil,
}
Events ​
See Events & commands for np_tattoos:inked, :healed, :removed, :covered, :flagged,
:designReviewed and :marks.