gta6/prompts
vehicles
Coreintermediatevehicles

Garage: Store and Retrieve Owned Vehicles

A QBCore garage zone where pressing E stores the car you are driving and retrieves your owned, stored vehicles from the database.

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

Description

A garage interaction zone for QBCore: stand in the garage and press E while seated to store the current vehicle (flag it in player_vehicles), or press E on foot to pull your most recent stored car. It ties the dealership purchase flow to actual driveable ownership and is the second pillar of vehicle gameplay after buying.

Prompt Template

You are writing a FiveM resource for QBCore. ONE Lua file, client + server sections…

🔒 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 at content/expected-outputs/vehicles/04-garage-store-retrieve.lua implements the proximity zone, a store path that flags state=1, and a retrieve path that queries by citizenid and…

🔒 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

  • Client-supplied ownership — Claude lets the client send which car to spawn; mandate a server query on citizenid.
  • Delete-before-confirm — deleting the car client-side before the DB store can lose it on desync; store first, accept the simple ordering and guard server-side.
  • State inversionstate meaning flips between store/retrieve; pin the convention (1=stored) explicitly.
  • Missing nil guardGetPlayer(source) can return nil on a dropped client; require the nil check before any DB write.

Integration Notes

client.lua + server.lua; fxmanifest.lua includes @oxmysql/lib/MySQL.lua in server_scripts and dependencies { 'qb-core', 'oxmysql' }. Reuses the dealership's player_vehicles table. Test: buy a car (entry 02), drive to [GARAGE_COORDS], press E to store, then press E on foot to pull it back.

Profit Potential

$240–$3500/mo on Tebex (expected ~$900). [INFERRED] A core ownership pillar with universal QBCore demand; it anchors squarely on the rising-niche base band.

Trend Signal

rising — vehicle modding/tuning niche-selection 3.75; corpus ox_fuel active.

Sales Angle

Sell paired with the dealership as the second pillar of vehicle ownership — DB-backed store and retrieve with no client-trusted lists. Recommend $139 on Tebex.

Difficulty & Ship Time

intermediate · ships in 1 day.