๐ฐ crp_scratchcard โ Scratchcard Minigame
Server-authoritative scratchcards with weighted rewards, clean bridges for QBCore/ESX and ox_inventory/qb-inventory, and fully configurable currency formatting (symbol/code/name, prefix/suffix, locale, separators, precision). Same sleek UI, plug-and-play setup.
Multi-Framework Multi-Inventory Configurable Currency Server-Side Logic
Why servers choose crp_scratchcard
- ๐ฏ Drop-in items: single item (default
scratchercard) for ox/qb with included images. - ๐ฎ Clean NUI: preserved original look; win amounts auto-formatted from your currency config.
- ๐ Weighted rewards: configurable prize tables per card type with multipliers & win-symbol rules.
- ๐งฐ Flexible SKUs: define multiple card types (prices/odds/labels) directly in
Config.Cards. - ๐ก๏ธ Anti-cheese: item checks + payout server-side; client only handles UI.
- โ๏ธ Zero friction: auto-detects framework & inventory (or force via config).
Compatibility Matrix
Framework
QBCore, ESX (auto-detect or force via config)
Inventory
ox_inventory, qb-inventoryUI
NUI (built bundle included)
Currency
Locale, symbol/code/name, prefix/suffix, thousand/decimal, precision
What you get
- ๐ข Open (unescrowed):
config.lua,bridge/init.lua,bridge/inventory/*.lua - ๐ Core logic:
server/main.lua,client/main.lua(ready for Tebex encryption if you choose) - ๐ผ๏ธ UI bundle:
web/with currency hook injected - ๐ Docs: Quickstart + item snippets for ox/qb
Quick Install
- Drop the resource into your
resourcesfolder. - Ensure dependencies (pick what you use):
ensure oxmysql ensure qb-core # or: ensure es_extended ensure ox_inventory # or: ensure qb-inventory ensure crp_scratchcard
- Add the item to your inventory config (examples below) and restart.
Config in 60 seconds
Config.Framework = 'auto' -- 'auto' | 'qb' | 'esx'
Config.Inventory = 'auto' -- 'auto' | 'ox' | 'qb'
Config.Currency = {
locale = 'en-US', currency = 'USD', style = 'symbol',
symbol = '$', position = 'prefix', thousand = ',', decimal = '.', precision = 0
}
Config.Cards = {
['threexthree'] = {
label = '3x3 Scratcher', item = 'scratchercard',
minWinSymbol = 3, multiplier = 1, prizeSquares = 9,
rewards = { {amount=100,weight=50}, {amount=250,weight=25}, {amount=500,weight=15}, {amount=1000,weight=8}, {amount=2500,weight=2} }
}
}Inventory Item Snippets
ox_inventory
['scratchercard'] = { label='Scratch Card', weight=0, stack=true, close=true, description='Try your luck!' }qb-core['scratchercard'] = { ['name']='scratchercard', ['label']='Scratch Card', ['weight']=0, ['type']='item',
['image']='lotto1.png', ['unique']=false, ['useable']=true, ['shouldClose']=true, ['combinable']=nil, ['description']='Try your luck!' }Tips & Commands
- ๐งช Test admin command (if you enable ox_lib groups):
/getscratcher threexthree - ๐ต Payout account defaults to
cash; switch tobankinserver/main.luaif you prefer. - ๐ช Add more card types by duplicating entries in
Config.Cards(different odds/labels/prices).
Preview
![]()
Support & Updates
Need help or feature requests? Join our Discord.
๐ Licensing: Config and bridges are open; core files can be encrypted via Tebex escrow at publish time.