gta6/prompts
business
Vaultintermediatebusiness

Player-Owned Storefront System

ESX/QB player-owned shop where the owner buys a vacant storefront, stocks items and sets retail prices, and every purchase depletes a server-authoritative live inventory.

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

Description

A player-owned storefront for ESX or QB: a player buys a vacant retail unit, stocks it with items, sets a retail markup, and any player or NPC purchase depletes a live, server-owned inventory that every shopper sees update in real time. It is a perennial Tebex staple — servers buy it as the economic backbone that turns idle map shops into a player-run retail loop.

Prompt Template

You are writing a FiveM resource for esextended (stable, exports getSharedObject).

🔒 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/business/01-player-owned-storefront.lua. It implements a server-owned shops table, a store-purchase that assigns ownership, an owner-gated restock,…

🔒 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 price/stock — Claude lets the client decrement stock and charge itself; keep price, balance and inventory count server-side keyed by shopId and source.
  • Anim before load — the till TaskPlayAnim no-ops if the dict is not loaded; always RequestAnimDict + a HasAnimDictLoaded wait loop.
  • One-sided net eventshop:sync on only one side leaves other shoppers on stale stock; both sides use RegisterNetEvent + AddEventHandler.

Corrective re-prompt: "Move stock, price and balance into server.lua keyed by shopId, read the price server-side in shop:buyItem, reject when the buyer can't afford or qty is 0, and broadcast shop:sync to every client after the decrement — never trust the price or count the client sends."

Framework Integration

  • ESX: local ESX = exports['es_extended']:getSharedObject(); charge with xPlayer.removeMoney(cost) and credit the shop via xPlayer.addAccountMoney('bank', amount) on the owner.
  • QBCore: local QBCore = exports['qb-core']:GetCoreObject(); use Player.Functions.RemoveMoney('cash', cost) and persist stock to a player_shops table.
  • QBox: use exports.qbx_core:GetPlayer(src) with the same money accessors; back stock with ox_inventory stashes if installed.

Profit Potential

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

Trend Signal

saturated — corpus: Perennial Tebex top-seller; ox_inventory-backed player shop recurs across scraper top-100 snapshots.

Sales Angle

Position as the anchor product of a business bundle — the storefront everyone needs but few ship cleanly server-authoritative, which is your differentiator. Recommended Tebex price $79.

Difficulty & Ship Time

intermediate · ships in 1 day.