How Integrations Work#
Nothing inside Lottery Creator calls your framework directly. Money, items, jobs, admins and character names go through one bridge per framework under custom/, picked at boot from what is already running. Everything else is detected the same way.
Layer | Supported | Without it |
|---|---|---|
Framework |
| Required. The resource does not load. |
Inventory | Whatever your framework uses — | Required: the ticket is an item. |
Target |
| 3D prompts with |
Prompts |
| The game's own 3D text. |
HUD |
| Only the radar is hidden while the creator is open. |
Phone | No app. Machines work as usual. | |
Database |
| Required. |
Every optional integration degrades silently. A missing resource makes its feature stand down — nothing errors.
Money Accounts#
Every payment names an account — money, bank or black_money — and the bridge translates it for your framework:
Account | ESX | QBCore / Qbox |
|---|---|---|
|
|
|
|
|
|
|
| The worth of the player's |
Money | Which account |
|---|---|
Ticket at a machine | The machine's payment account, chosen in the creator from |
Ticket on the phone |
|
Prizes | Always |
Buying a machine, restocking, earnings, resale |
|
Target and Prompts#
With ox_target or qb-target running, each machine gets up to two options, each shown only to the players it applies to:
Option | Shown to |
|---|---|
Buy <name> - $<price> | Anyone allowed to use the machine, while it sells tickets. |
Buy machine - $<price> | Anyone, while the machine is unowned and for sale. |
Manage machine | Its owner, and framework admins. |
Without a target, the same options become 3D prompts within Config.VendorInteractDistance: E buys a ticket and G opens Buy or Manage — or E when that is the only option. With qs-textui running, the prompts take its look. Set Config.UseTarget = false to use prompts even with a target installed.
With qb-target, a machine's options are worked out when it spawns. Machines respawn whenever they change — price, sale settings, stock running out or coming back — so this rarely shows; a player whose job changes sees the difference after rejoining.
Inventories and the Item#
The ticket is given, taken and counted through your framework's own item functions, and made usable through ESX.RegisterUsableItem or QBCore.Functions.CreateUseableItem. Any inventory that honours those works — ox_inventory, qs-inventory, qb-inventory and the ESX default all do. The definition for each is in Installation → Adding the Scratchcard Item.
The Phone#
The Lottery app ships with Quasar Smartphone and reaches Lottery Creator by its resource name, qs-lottery-creator. There is nothing to wire up beyond Config.Phone, and the start order does not matter: the app checks the lottery is running on every request.
Using another phone? The app is built on five server callbacks that any phone app can call — see Commands and Exports → Phone Callbacks.
Adding a Framework#
Supporting another framework is one folder and one line.
Copy the closest bridge
Copy
custom/qb/orcustom/esx/— itsclient.luaandserver.lua— to a new folder such ascustom/mycore/.Change the calls inside
Each function wraps one framework call. On the server:
getPlayerFromId,getIdentifier,getAccountMoney,removeAccountMoney,addAccountMoney,addItem,removeItem,getItem,registerUsableItem,playerIsAdmin,getJobName,getJobGrade,getJobsData,getUserNameandgetSourceFromIdentifier. On the client:getJobNameandgetJobGrade.Keep what each one returns:
removeAccountMoneyanswers true or false,addItemanswers true when the item fitted, andgetItemreturns a table with acount.Register it for detection
In
config/main.lua, map your core resource to the folder name:lua local frameworks = { ['es_extended'] = 'esx', ['qb-core'] = 'qb', ['qbx_core'] = 'qb', ['l2s-core'] = 'qb', ['my_core'] = 'mycore', -- loads custom/mycore/ }
The same files are where an existing bridge is adjusted — for instance, a server whose staff use another ESX group:
-- custom/esx/server.lua
function framework:playerIsAdmin(source)
local group = self:getPlayerFromId(source).getGroup()
return group == 'admin' or group == 'superadmin' or group == 'mod'
endLanguages#
41 translations ship in locales/: Arabic (ar), Bulgarian (bg), Bengali (bn), Catalan (ca), Czech (cs), Danish (da), German (de), Greek (el), English (en), Spanish (es), Estonian (et), Persian (fa), Finnish (fi), French (fr), Hebrew (he), Hindi (hi), Croatian (hr), Hungarian (hu), Indonesian (id), Italian (it), Japanese (ja), Korean (ko), Lithuanian (lt), Latvian (lv), Malay (ms), Dutch (nl), Norwegian (no), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Slovak (sk), Slovenian (sl), Swedish (sv), Swahili (sw), Thai (th), Turkish (tr), Ukrainian (uk), Urdu (ur), Vietnamese (vi) and Chinese (zh).
Pick one with Config.Locale. English is always loaded underneath, so a line missing from a translation shows in English rather than blank. To add a language, copy locales/en.json to a new file such as locales/xx.json, translate the values — keep the keys and the {{placeholders}} — and set Config.Locale = 'xx'.
Currency#
Config.Intl formats every amount in the interface. A euro server, for example:
Config.Intl = {
locales = 'es-ES',
options = {
style = 'currency',
currency = 'EUR',
minimumFractionDigits = 0,
}
}A few messages write the $ sign themselves — the ticket option, the win message and the ownership notifications. Change it in your locale file if your server uses another currency.



