gta6/prompts
economy
Vaultadvancedeconomy

Stock Market — Brokerage Portfolio & Dividends

QBCore equities brokerage where multiple tickers drift each cycle and the server pays periodic dividends on per-player share books.

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

Description

A simulated equities brokerage for roleplay servers: several tickers drift on a server cycle, players buy and sell shares from bank funds, and the server pays periodic dividends scaled to each holding. Servers sell it because dividends create a recurring passive-income reason to log in, anchoring a white-collar economy beside the criminal one.

Prompt Template

You are writing a FiveM resource for qb-core (port notes below).

🔒 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/economy/13-stock-market-brokerage-portfolio.lua drifts ticker prices and pays dividends on two server threads, re-resolving holders by citizenid, while…

🔒 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

  • Offline/double dividends — paying without re-resolving by citizenid pays ghosts or double-pays. Look up each holder fresh per cycle.
  • Client-quoted price — settling a trade at a client value lets a player forge a price. Read tickers[sym].price on the server only.
  • Book race — concurrent drift/dividend/trade access corrupts shares. Keep all book mutation in the event/thread handlers, never on the client.

Corrective re-prompt: "In the dividend thread, iterate books and GetPlayerByCitizenId(cid) each cycle, skipping offline holders, and pay floor(shares*price*div) to bank. Ensure buy/sell read tickers[sym].price server-side and never accept a price argument from the client."

Framework Integration

ESX: use getSharedObject(), getAccount('bank'), addAccountMoney/removeAccountMoney, key books by identifier. QBCore: as written — GetPlayer, GetPlayerByCitizenId, AddMoney/RemoveMoney, books by citizenid. QBox: exports.qbx_core:GetPlayer(src) plus the shared money functions; citizenid maps 1:1.

Profit Potential

$150–$2000/mo on Tebex (expected ~$500). [INFERRED] Priced inside the $50-389 script band against the signal-scraper corpus (tebex_snapshot n=100, median seller $11.85K/mo); a stable lower-volume equities niche.

Trend Signal

stable — corpus: Stock-market scripts are a known but lower-volume Tebex economy listing (tebex_topsellers cat:economy); steady, not surging.

Sales Angle

Lead with dividends as recurring passive income for white-collar roleplay — the payout notification is the retention hook. Recommended Tebex price: $169.

Difficulty & Ship Time

advanced · ships in 1 day.