gta6/prompts
gangs
Vaultintermediategangs

Rank Hierarchy & Permissions

QBCore tiered gang ranks (boss/underboss/soldier) that gate stash, treasury and promotion actions through a server-authoritative permission matrix.

NON-TESTÉ — the reference Lua is syntax-validated, not run in a live FiveM server. Adapt and test on your own dev server before shipping.
Est. Lua
~86 loc
Claude
Claude Opus 4.x / Sonnet 4.x
Validation
syntax-validated
Updated
2026-06-25

Description

A working QBCore rank/permission layer: ranks map to grade levels (soldier 1, underboss 3, boss 4) and a server-side matrix gates /gangstash, /gangtreasury and /gangpromote. It is a commodity on its own, but it is the gate that makes the paid treasury and turf modules safe to ship.

Prompt Template

You are writing a FiveM resource for QBCore (qb-core, exports['qb-core']:GetCoreObject()).

πŸ”’ Eyes-only β€” locked prompt body

The full prompt template and its reference Lua are part of a one-time pack. Pick your depth β€” both are lifetime access, no subscription, ever.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access β€” pay once
Most Popular Β· Best Value
Vault$199one-time
  • All 510 prompts β€” the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates β€” new niches as the market moves
Get the Vault β€” $199

$49 for 60 Β· $199 for all 510 + intelligence β€” one-time, no subscription.

Expected Output

The reference Lua lives at content/expected-outputs/gangs/03-rank-hierarchy-permissions.lua. It implements a server-side Required actionβ†’grade matrix, an access check that re-reads the player's gang…

πŸ”’ Eyes-only β€” locked prompt body

The full prompt template and its reference Lua are part of a one-time pack. Pick your depth β€” both are lifetime access, no subscription, ever.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access β€” pay once
Most Popular Β· Best Value
Vault$199one-time
  • All 510 prompts β€” the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates β€” new niches as the market moves
Get the Vault β€” $199

$49 for 60 Β· $199 for all 510 + intelligence β€” one-time, no subscription.

Known Failure Modes & Corrective Prompt

  • Client-side gate β€” the grade is checked before showing the action only; a packet bypasses it. Re-check the grade in the server handler.
  • No promote guard β€” without a boss-grade requirement anyone self-promotes; require the top grade server-side and clamp the target grade.
  • One-sided net event β€” grant/deny on a single side breaks feedback; both sides need RegisterNetEvent + AddEventHandler.

Corrective re-prompt: "Re-read PlayerData.gang.grade.level on the server inside every access handler and compare it to the Required table there β€” never trust a grade sent from the client. Gate gangranks:promote behind the boss grade, resolve the target by citizenid, and clamp the new grade to 0-4 before SetGang."

Framework Integration

  • ESX: map ranks onto job.grade; replace SetGang with xPlayer.setJob(name, grade) and read xPlayer.job.grade for the gate.
  • QBCore: native β€” PlayerData.gang.grade.level is the rank; Player.Functions.SetGang(name, grade) performs the promotion.
  • QBox: identical to QBCore through exports.qbx_core; the grade matrix and SetGang are unchanged.

Profit Potential

$80–$1200/mo on Tebex (expected ~$300). [INFERRED] $50-389 script band Γ— est units/mo for a saturated niche, against the signal-scraper tebex_snapshot corpus (n=100, median seller $11.85K/mo).

Trend Signal

β†˜ saturated β€” inferred: Rank/permission grades ship with qb-gangs free; commodity layer. Native to the QB gang grade model.

Sales Angle

Frame it as the access-control backbone that makes a gang's treasury and turf modules tamper-safe. It belongs inside a $59-99 gang pack where the value is enforcement, not as a $20 standalone competing with free grade systems.

Difficulty & Ship Time

intermediate Β· ships in 3-5h.