Alamo Studio Logo
Advanced

Job Restrictions

Lock shops to jobs and minimum grades.

Any shop can be restricted to one or more jobs, optionally with a minimum grade. Players who don't qualify can't open it or buy from it.

By default a shop has no jobs, so everyone can use it.

Restrict to one or more jobs

Add a jobs array of job names:

config.lua
jobs = { 'police', 'ambulance' },

Anyone with one of those jobs (any grade) can use the shop.

Minimum grade for all listed jobs

Add minJobGrade to require a minimum grade across all listed jobs:

config.lua
jobs = { 'police' },
minJobGrade = 2, -- police grade 2 or higher

Per-job minimum grade

For different grades per job, use the table form. Each entry can carry its own minGrade:

config.lua
jobs = {
    { name = 'police', minGrade = 2 },
    { name = 'ambulance', minGrade = 0 },
},
If an entry has no minGrade, it falls back to the shop's minJobGrade (or 0 if that's unset too).

Where to put it

These fields go on a shop location or a custom shop:

config.lua
{
    id = 'police_store',
    label = 'Police Supply',
    coords = vector4(452.3, -980.0, 30.7, 90.0),
    catalog = 'convenience',
    jobs = { { name = 'police', minGrade = 1 } },
    paymentMethods = { 'card' },
},

How it's enforced

  • The client hides the shop's interaction from players who can't access it.
  • The server re-validates job + grade on purchase, so it can't be bypassed.
  • Grade is read from your framework (QBox/QBCore/ESX) automatically.
Use the exact job name as it exists in your framework (e.g. police, ambulance, mechanic). A wrong name means no one qualifies.
Copyright © 2026