gta6/prompts
casino
Vaultbeginnercasino

Raffle Prize Draw

ESX/QBCore/QBox vehicle/item raffle with booth ticket sales and a server-authoritative weighted random draw at close.

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

Description

A raffle booth where players buy tickets toward a vehicle or item prize, the server records each buyer's ticket count, and an admin closes the draw to run a weighted random pick (more tickets = better odds). Servers buy it because it's an economy sink and a recurring event hook with a tamper-proof server-side draw.

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 at content/expected-outputs/casino/29-raffle-prize-draw.lua implements a proximity booth with a buy animation, a server-side ticket ledger with a per-player cap, and a weighted…

πŸ”’ 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-run draw β€” Claude runs the draw and picks the winner on the client; keep the ledger and weighted draw server-side.
  • Anim before load β€” the buy TaskPlayAnim no-ops unless the dict is loaded first via RequestAnimDict + while not HasAnimDictLoaded(dict) do Wait(0) end.
  • One-sided net event β€” defining raffle:bought / raffle:drawn on only one side breaks the round-trip; both sides need RegisterNetEvent + AddEventHandler.

Corrective re-prompt: Hold the ticket ledger in server.lua keyed by source and run the weighted draw server-side; the client only renders what the server sends. Validate the ticket count and per-player cap server-side and charge via removeMoney. Restrict the draw to a server-only RegisterCommand, guard the buy animation with RequestAnimDict + a HasAnimDictLoaded wait loop, and define every round-trip event with RegisterNetEvent + AddEventHandler on both sides.

Framework Integration

  • ESX: exports['es_extended']:getSharedObject(), then xPlayer.getMoney() / removeMoney for ticket sales and addInventoryItem for the prize.
  • QBCore: swap to exports['qb-core']:GetCoreObject() and use Player.Functions.RemoveMoney('cash', cost) / Player.Functions.AddItem('raffle_prize', 1) off QBCore.Functions.GetPlayer(src).
  • QBox: use exports.qbx_core:GetPlayer(src) with player.Functions.RemoveMoney and the ox_inventory AddItem export; identical server-authoritative flow.

Profit Potential

$150–$1800/mo on Tebex (expected ~$450). [INFERRED] priced inside the $50-389 FiveM script band against a stable prize-sink niche; corpus median seller $11.85K/mo (signal-scraper tebex_snapshot n=100).

Trend Signal

β†’ stable β€” inferred: Domain: event prize-sink (vehicle/item raffles), stable demand.

Sales Angle

Sell it as an economy prize-sink and event driver β€” admins close the draw to award a vehicle or item. Recommended Tebex price $79.

Difficulty & Ship Time

beginner Β· ships in 3-5h.