gta6/prompts
gangs
Vaultbeginnergangs

Gang Creation & Registration

QBCore gang-founding command that registers a name, tag and blip color and sets the founder as boss in a server-authoritative identity record.

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
~74 loc
Claude
Claude Opus 4.x / Sonnet 4.x
Validation
syntax-validated
Updated
2026-06-25

Description

A working QBCore gang creation command: the founder runs /creategang <name> <tag> <blipColor> and the server mints a unique gang-identity record, then promotes them to the boss grade. This is the identity spine every other gang mechanic (roster, ranks, rep, turf) reads from, so it is table-stakes rather than a feature you sell on its own.

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/01-gang-creation-registration.lua. It implements the /creategang command, a server-side Gangs table keyed by a slugified name with…

πŸ”’ 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-trusted identity β€” the gang table or boss grade is set client-side, letting anyone mint a gang. Keep the table and SetGang server-only.
  • No uniqueness guard β€” duplicate or empty names overwrite an existing record; slugify and reject taken keys server-side.
  • One-sided net event β€” the result event defined on a single side breaks the round-trip; both sides need RegisterNetEvent + AddEventHandler.

Corrective re-prompt: "Move the entire Gangs table and the boss-grade assignment to server.lua only. Slugify the name, reject it if Gangs[key] already exists or the name/tag fail the length checks, and clamp the blip color to 0-85 before storing. The client should only send the request and render the returned result."

Framework Integration

  • ESX: no first-class gang model β€” bridge by storing the record in your own table and mapping it onto a society_* job, or use a gang addon; SetGang has no ESX equivalent.
  • QBCore: native β€” Player.Functions.SetGang(name, grade) writes the gang grade QB already understands; pair the key with a qb-gangs style config entry.
  • QBox: drop-in with QBCore; use exports.qbx_core or the shared object and the same SetGang API.

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: Base gang systems are commodity (qb-gangs ships free, many clones); the identity record is table-stakes, not a differentiator. QB models gangs first-class; ESX would need a bridge.

Sales Angle

Sell it as the foundation block of a turf/rep gang bundle, never alone. Anchor the bundle at the $50-79 entry tier and let this module justify the "complete gang framework" framing the higher turf/war modules monetize.

Difficulty & Ship Time

beginner Β· ships in 2-4h.