~/docs/tattoo-shop-v2/configuration/access
tattoo shop v2 docs›
Tattoo shop V2
Access
-- 5 code blocks · 1 min read
By default everything is open to everyone. Config.Access lets you gate three levels independently.
Config.Access = {
modes = { vanilla = 'all', image = 'all', freehand = 'all' },
collections = {}, -- ['mpheist4_overlays'] = 'vip'
tattoos = {}, -- ['bea_m_back_000'] = 'vip'
}
Any value other than 'all' requires the player to hold that group.
Examples
Freehand drawing reserved to VIPs:
Config.Access = {
modes = { vanilla = 'all', image = 'all', freehand = 'vip' },
}
A whole collection reserved, and one specific tattoo sold separately:
Config.Access = {
modes = { vanilla = 'all', image = 'all', freehand = 'all' },
collections = {
['mpheist4_overlays'] = 'vip',
},
tattoos = {
['bea_m_back_000'] = 'gold',
},
}
How a group is checked
A player passes if either is true:
- they have the ace permission
vartattoo.<group>(sovipbecomesvartattoo.vip) - their framework group matches (ESX group, QBCore permission)
Add the ace in your server.cfg:
add_ace group.vip vartattoo.vip allow
The check runs again on the server when the tattoo is submitted, not only when the UI is built. Hiding an entry in the menu is never the only thing standing between a player and a locked collection.
Standalone servers
With no framework, wire your own group logic:
Config.Standalone = {
PlayerInGroup = function(src, group)
-- return true if src belongs to `group`
end,
IsAdmin = function(src) return false end,
GetMoney = function(src, account) return 0 end,
RemoveMoney = function(src, amount, account) return true end,
Notify = function(src, msg, kind) end,
}
Leave them nil and the shop is simply free and fully open.