Cuxial License reads its options from shared/config.lua and its offices from data/offices.lua. Card designs are not in any file: staff create them in game with /license.
Where each value comes from
Most sections can be edited live from the Settings, Jobs and factions and Offices sections of the /license panel. Those changes are saved in the database and reach every player at once.
| Source | Sections | When it applies |
|---|---|---|
shared/config.lua only | debug, ui, admin, commands, issuing.defaultIdCard, photo.mapResource, photo.greenScreenPos | On resource restart |
| Database, editable in the panel | jobs, documents, payment, showRadius, issuing, store, display, photo, idCheck, fakeId | At once. display (keys and times) needs a restart |
| Database, editable in the panel | Offices | At once. data/offices.lua is only the first install |
On the first start the script copies the values of shared/config.lua to the table cuxial_license_settings. From then on the database wins for the live sections.
After the first start, editing a live section in shared/config.lua is not enough. Restart the resource and press Factory on that section in Settings: it loads the values the file has at that moment. A badge faction you add to the file is the exception: it is added to the database on the next start.
The Settings section also exports and imports every section as JSON, to copy a setup from one server to another.
General
| Option | Type | Default | What it does |
|---|---|---|---|
debug | boolean | false | true prints traces in the server and client console. The convar cuxial_license_debug 1 does the same. |
ui.accent | string (hex) | configurable | Accent colour of every panel. |
admin.permission | string | 'admin' | Framework permission needed to open /license and manage designs, issued documents, offices and settings. Checked through cuxial_bridge. |
showRadius | number | 5.0 | Metres. Players inside it see the card you show, and are the ones listed as nearby in the issuing and ID check panels. Between 0.5 and 50. |
payment.account | string | 'cash' | Account charged at the office store. 'cash' or 'bank'. |
Commands · commands
| Option | Type | Default | What it does |
|---|---|---|---|
license.name | string | 'license' | Name of the staff command, without the slash. |
checkLicense.name | string | 'checklicense' | Name of the ID check command. |
jobIssue.name | string | 'jobissue' | Name of the issuing command. |
*.restricted | boolean | string | false | Passed to ox_lib. false lets anyone type the command; the script still checks the permission inside. true or a principal such as 'group.admin' also asks for the ACE command.<name>. |
Jobs · jobs
Three tables of job name = minimum grade. The player needs that job with the grade shown or higher. The jobs in the file are examples: replace them with yours.
| Option | Default | What it does |
|---|---|---|
authorized | police = 8, ambulance = 4, fib = 8 | Jobs that use /jobissue, issue cards, see nearby players and use /checklicense. |
revoke | police = 8, fib = 8 | Jobs that revoke and restore in the issuing panel. Staff can always do it. |
idCheck | police = 0, fib = 0 | Extra jobs that only use /checklicense and the ID check panel. |
jobs = {
authorized = { police = 2, sheriff = 2 },
revoke = { police = 4 },
idCheck = { police = 0, sheriff = 0 },
},Each card also has its own list of jobs that can issue it, set in the designer (see Card options in the designer below).
The server exports for an MDT check that the job is listed in jobs.authorized or jobs.revoke, without looking at the grade. The MDT decides the rank.
Documents and badges · documents
| Option | Type | Default | What it does |
|---|---|---|---|
idItems | string[] | { 'id_card', 'cedula_id' } | Items that count as an identity document. The exports report them with kind = 'id'; badge cards are 'badge' and any other card is 'license'. |
badges | table | three factions | One badge per faction. See the table below. |
photoHosts | string[] | Fivemanage addresses | URL prefixes accepted as an external photo when an MDT issues a document. https only. |
reasonMin | number | 3 | Minimum characters of a revocation reason. |
reasonMax | number | 200 | Maximum characters of a revocation reason. Up to 255. |
revokeOnJobLoss | boolean | true | true revokes the badge of a player who leaves the faction's job. false lets them keep it. |
Each badge · documents.badges.<faction>
The file comes with police, ambulance and fib as examples, with neutral names and logos. Add, remove or rename factions to match your jobs.
| Option | Type | What it does |
|---|---|---|
item | string | Item of the badge. It must exist in your inventory. |
jobs | string[] | Jobs that carry this badge. |
cardId | string | false | Card design used for the badge. false takes the most recent design with the Badge size and this item. |
shape | string | 'shield', 'round', 'star7', 'star6' or 'eagle'. |
metal | string | 'gold', 'silver', 'bronze', 'chrome', 'black', 'graphite', 'navy-silver' or 'navy-gold'. |
ribbon.top / ribbon.bottom | string | Curved text above and below the badge. {callsign} is replaced by the holder's badge number. |
logo | string | Image in the centre of the badge: a path inside web/build (image/…) or an https link. |
preset | string | Factory design of the wallet card, used while the badge card has no design of its own. |
ranks | table | grade = { insignia = '…', label = '…' }. Insignia: 'bars1' to 'bars3', 'star1' to 'star5' or 'eagle'. label is optional. {} shows no insignia. |
sheriff = {
item = 'sheriff_badge', jobs = { 'sheriff' }, cardId = false,
shape = 'star7', metal = 'gold',
ribbon = { top = 'SHERIFF', bottom = '{callsign}' },
logo = 'image/brand/police.webp',
ranks = {
['0'] = { insignia = 'bars1' },
['4'] = { insignia = 'star1', label = 'Sergeant' },
},
},The badge itself is a card design with the Badge size and the faction's item, created in /license. An MDT hands it out with IssueBadge.
Issuing · issuing
| Option | Type | Default | What it does |
|---|---|---|---|
photoTimeout | number | 60 | Seconds the player has to accept a request from /jobissue and take the photo. Between 10 and 600. |
defaultItem | string | 'id_card' | Item handed out for a card design with no item name. |
presets | table | id_card → factory ID design | item = factory design. Draws the card of that item with a factory design while its card has no design of its own. |
defaultIdCard | table | false | { item = 'id_card', heading = 'Documento de identidad', price = 50 } | On start, creates an ID card design with this item, title and office fee if no design uses the item yet. false creates nothing. Only in the file. |
The item of defaultIdCard must exist in your inventory before the first start. If it does not, the console shows an error and the design is not created.
Store · store
| Option | Type | Default | What it does |
|---|---|---|---|
maxPerPurchase | number | 5 | Cards a player can buy in one purchase. Between 1 and 20. |
sessionTimeout | number | 300 | Seconds an open purchase lasts, from payment to photo. At least 30. |
Showing a card · display
Changes to this section need a resource restart.
| Option | Type | Default | What it does |
|---|---|---|---|
hideKey | string | 'E' | Default key to put the card away. |
flipKey | string | 'G' | Default key to flip the card and see the back. |
duration | number | 30 | Maximum seconds your own card stays on screen. |
nearbyDuration | number | 5 | Seconds nearby players see it. |
showCooldown | number | 3 | Seconds between two uses of a card. |
Each player can rebind both keys in the GTA settings, under Key Bindings → FiveM.
Photo studio · photo
During the photo the player is moved to the studio, alone in their own routing bucket, and returned to where they were.
| Option | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | true | false issues and sells cards with no photo session and no photo. |
signature | boolean | true | true asks for a signature after the photo; if the player skips it, the name is written in a handwritten font. false asks for none. |
mapResource | string | 'cuxial_license_map' | Resource of the green-screen studio. If it is not started, the photo session does not open. Only in the file. |
camOffset | vector3 | vec3(0.0, 0.7, 0.65) | Starting frame. z is the height of the point the camera looks at; y plus 0.5 is the starting distance in metres. |
fov | number | 36.0 | Field of view of the camera. Lower values zoom in. |
greenScreenPos | vector4 | inside the studio | Where the player stands for the photo. Only in the file. |
waitTimeout | number | 8000 | Maximum milliseconds of each wait during the transfer (fade, collision). |
maxSession | number | 300 | Maximum seconds with the camera on before the player is sent back. |
bucketBase | number | 64000 | Routing bucket of the photo = this value + the player's server id. Change it if another resource uses that range. |
maxUploadSize | number | 4000000 | Maximum size of a photo, in base64 characters. |
uploadCooldown | number | 3 | Seconds between two uploads of the same player. |
captureCooldown | number | 2 | Seconds between two captures of the same player. |
Only change greenScreenPos if you move the photo to a green-screen room of your own. The background is removed by colour, so a place without a green backdrop gives a photo with its scenery.
ID check · idCheck
| Option | Type | Default | What it does |
|---|---|---|---|
logo | string | 'image/default.png' | Image of the panel. Path inside web/build. |
title | string | 'Los Santos Police Department' | Title of the panel. |
refreshInterval | number | 3000 | Milliseconds between refreshes of the nearby player list while the panel is open. |
Fake IDs · fakeId
| Option | Type | Default | What it does |
|---|---|---|---|
enabled | boolean | false | true turns the generator on. Create the item first. |
itemName | string | 'fake_id' | Item given to the player, with export = 'cuxial_license.useFakeId'. |
jobs | string[] | {} | Jobs that can use the generator. {} = anyone. |
requiredItem | string | false | false | Item consumed for each document. false = none. |
price | number | 5000 | Cost of each document. 0 = free. |
account | string | 'cash' | Account charged: 'cash', 'bank' or 'black_money'. |
cooldown | number | 300 | Seconds between two documents of the same player. |
sessionTimeout | number | 300 | Seconds the panel stays valid once opened. |
The generator has no command and no NPC. Open it from your own resource with openFakeId, for example from a hidden location.
Offices · data/offices.lua
Each office spawns an NPC that sells a list of cards. The file is read once, while the offices table is empty; after that, edit the offices in the Offices section of /license, where you can also place the NPC at your position.
| Option | Type | What it does |
|---|---|---|
id | string | Unique id: lowercase letters, numbers and _, up to 32 characters. |
label | string | Name of the office, shown on the NPC and in the store. |
enabled | boolean | false hides the office. |
coords | table | { x, y, z, w }. w is the heading of the NPC. |
model | string | Ped model. |
usePlayerSkin | boolean | true dresses the NPC as the player. Works with cuxial_interactions. |
scenario | string | Scenario the NPC plays, such as 'WORLD_HUMAN_CLIPBOARD'. Optional. |
distance | number | Metres at which the NPC spawns. Between 5 and 100. |
blip | table | enabled, sprite, color, scale and an optional label. |
dialog | table | name, greeting and howItWorks: texts of the NPC conversation with cuxial_interactions. Empty = default texts. |
items | string[] | The office sells every card design that hands out one of these items. |
jobs | string[] | Only these jobs see the office. {} = everyone. |
hours | table | { from = 8, to = 20 } in game hours. Outside that range the office is closed. Omit it, or use the same hour twice, to keep it always open. |
The file comes with a city hall office enabled and two disabled examples. Change their positions, names and texts to fit your server.
{
id = 'cityhall',
label = 'City Hall',
enabled = true,
coords = { x = 316.34, y = -225.12, z = 54.08, w = 160.0 },
model = 's_m_y_cop_01',
scenario = 'WORLD_HUMAN_CLIPBOARD',
distance = 30,
blip = { enabled = true, sprite = 498, color = 0, scale = 0.7 },
dialog = { name = 'Alex', greeting = 'Good morning.', howItWorks = 'Pick a document, pay and smile.' },
items = { 'id_card' },
jobs = {},
hours = { from = 8, to = 20 },
},The office hour comes from av_weather or prim_climatime when one of them is running, and from the game clock otherwise.
Card options in the designer
Each card design carries its own options. The designer has three tabs: Design (size, layers, front and back), Data (name, custom fields) and Rules.
| Option | Tab | What it does |
|---|---|---|
| Active | Rules | Turned off, the card leaves the store and issuing without being deleted. |
| Restrict to job and its jobs | Rules | Takes the card out of the store. If the card has no issuing jobs, only these jobs can issue it. |
| Jobs that can issue | Rules | Jobs that can hand this card to other players. Empty = any job in jobs.authorized. |
| Charge money and price | Rules | Price at the store. A card without it is free at an office and does not appear in a store opened without an office. |
| Item name | Rules | Item handed out. Empty = issuing.defaultItem. Check confirms the item exists, and the designer shows the definition ready to copy. |
| Requirements | Rules | The store only offers the card to players who hold the marked documents (valid, not revoked or expired), have one of the jobs and carry the item. All optional. |
| Custom fields | Data | Up to 12 fields (text, list, date or number) filled by whoever issues the card. In the design, use them as custom:<key>. |
Texts in the design take the holder's data in braces, such as {first_name}, {birthdate}, {rank} or {callsign}. A design can be saved as a Template and reused on other cards.
Deleting a card design also deletes every document issued from it. The items stay in the inventories but no longer show anything. To retire a card, turn Active off instead.
Common changes
Charge the bank account at the store
payment = { account = 'bank' },Let a lower rank issue cards
jobs = {
authorized = { police = 1 },
revoke = { police = 4 },
idCheck = { police = 0 },
},Turn on fake IDs for one job, paid with dirty money
fakeId = {
enabled = true,
itemName = 'fake_id',
jobs = { 'forger' },
requiredItem = false,
price = 2500,
account = 'black_money',
cooldown = 300,
sessionTimeout = 300,
},After the first start, make these changes in the panel, or restart and press Factory on that section.
