Skip to content

Configuration

How Cuxial Police stores its settings and what every section and option does.

Cuxial Police keeps its settings in the database and edits them from a tab of the tablet. This page explains how that works and what each option does.

How settings work ​

WhereWhat it is
install/defaults/config.luaFactory values of the main settings
install/defaults/police/, ems/, fib/, shared/Factory values of the data lists (permissions, radio, objects...)
Table cuxial_police_settingsThe values the server really uses
Settings tab of the tabletWhere you change them

On first start every section is copied from install/defaults/ to the database. From then on the database is the only source: the files are read again only to restore a section.

Editing a file in install/defaults/ does not change an installation that has already started once. Change the value in the settings tab. To bring a file edit into a running installation, restart the resource and use the factory values button of that section.

The settings tab ​

The tab appears in the tablet for staff members: players with the admin permission of your framework. The player also needs a faction job, because only faction members can open the tablet.

ActionWhat it does
SaveStores the section and applies it to the server and every player
Factory valuesRestores the section to what install/defaults/ holds
ExportCopies the customised sections to the clipboard as JSON
ImportLoads sections from that JSON

Most sections apply at once. These need a restart of the resource:

SectionWhy
config.radio, data.radio, data.radioaudioFrequencies and the audio effect are built once at start
data.keybindsKeys are registered once at start
fingerprint.closeKey, data.surrender → cancelKeyThey are keys
addons.fib.enabled, addons.fib.devices.itemsThe addon and its item exports are registered once at start

This page names each section by its id and gives the title you will see in the settings tab.

Jobs and general ​

Sections config.jobs (Trabajos) and config.general (General).

OptionTypeDefaultWhat it does
policeJobstable{ police = true }Jobs that belong to the police faction
emsJobstable{ ambulance = true }Jobs that belong to the EMS faction
factionJobstablepolice → 'police', ambulance → 'ems'Job to faction map ('police', 'ems'). Filled in from the two lists above; federal jobs are added automatically. To remove a job, delete it here too
bossLevelnumber8Grade from which a member counts as boss, besides the grades your framework already marks as boss
cameraRadiusnumber100.0Radius in metres used to look for CCTV cameras around the officer

Tablet options and colours ​

Sections config.appOptions (Opciones de la MDT) and config.theme (Colores).

OptionTypeDefaultWhat it does
appOptions.confiscatebooleantrueShows the seize option in the tablet and the quick menu. It only changes the interface
appOptions.itemImagePathstring'https://cfx-nui-ox_inventory/web/images/'Folder the tablet loads item images from. Change it if your inventory keeps its images somewhere else
appOptions.itemImageFormatstring'webp'Extension of those images: 'png', 'webp' or 'jpg'
theme.policetableconfigurableColours of the police tablet and HUD
theme.emstableconfigurableColours of the EMS tablet and HUD
theme.fibtableconfigurableColours of the federal tablet and HUD

Each theme has accent (required) and light, dark and gradientTo (optional). The three optional colours are derived from accent when they are left out. All of them are hex colours.

Radio ​

Sections config.radio (Radio), data.radio (Canales de radio), data.radioanims (Animaciones de radio) and data.radioaudio (Audio de radio).

OptionTypeDefaultWhat it does
radio.enabledbooleantruefalse: players cannot join frequencies
radio.defaultVolumenumber1.0Radio volume a player starts with (0 to 1)
radio.centralFreqstableDISPATCH, COMMANDFrequencies that work as command tier: they talk to every tactical frequency of the faction
radio.shareWithtable{ fib = { 'police' } }faction = { other factions }: the key faction also sees and uses the frequencies of the listed factions. One direction only; by default the federal agency joins police frequencies, not the other way round

data.radio holds one list of frequencies per faction (police, ems, fib), grouped by category, and a blips table that gives a map sprite and colour to the members tuned to a frequency. The names in the default file are examples to replace.

data.radioaudio holds the audio effect. proximityFxCutoff (default 4.0) is the distance under which a speaker is heard without the radio effect.

Dispatch ​

Section config.dispatch (Central / avisos) and data.gunshotwhitelist (Disparos ignorados).

OptionTypeDefaultWhat it does
dispatch.enabledbooleantruefalse: gunshot alerts are not sent
dispatch.ignoredJobstable{}Jobs whose on-duty members do not trigger gunshot alerts. Accepts a list or a job = true map
dispatch.sendAlertCooldownnumber10Seconds between two alerts sent by the same player through the client export
dispatch.gunshotCooldownnumber5Seconds between two gunshot alerts from the same player
dispatch.entornoCooldownnumber30Seconds between two uses of /entorno
dispatch.radioCodeCooldownnumber3Seconds between two radio codes from the same member

data.gunshotwhitelist is the list of weapon names that never trigger a gunshot alert.

Fines and revenue ​

Sections config.payment (Cobros), config.revenue (Recaudación) and data.paymentLocations (Puntos de pago).

OptionTypeDefaultWhat it does
payment.enabledbooleantruefalse turns the payment points and the payment commands off
payment.commandsbooleanfalsetrue: /paymultas and /payfacturas open the payment screen from anywhere. false: fines and bills are paid only at the payment points
payment.payAccountstring'bank'Account charged first: 'bank' or 'cash'
payment.allowCashFallbackbooleantrueCharges cash when the first account is short
payment.bankFeePercentnumber0Extra percentage added to the amount
revenue.enabledbooleantrueSends what is paid to the faction account through cuxial_banking
revenue.police.societyNamestring'police'Account that receives police fines
revenue.police.societyLabelstringconfigurableConcept shown in the account movement
revenue.ems.societyNamestring'ambulance'Account that receives medical bills
revenue.ems.societyLabelstringconfigurableConcept shown in the account movement
revenue.ems.commissionPercentnumber30Share of a medical bill paid to the doctor who issued it, if online
revenue.ems.commissionAccountstring'bank'Account where the doctor receives the commission

Each entry of data.paymentLocations is a point with coords, heading, size, issuer ('police' or 'ems'), label, icon and distance. Two points ship by default, one for the police at Mission Row and one for EMS at Pillbox Hill; move them to your own buildings.

Station points ​

Sections config.stations (Estaciones) and config.stationNpc (NPC de las estaciones). The list starts empty and is built in game with the editor of the settings tab.

FieldTypeWhat it does
idstringUnique identifier of the point
typestring'duty', 'stash', 'armory', 'mdt' or 'event'
labelstringText of the interaction
coordsvectorPosition, with optional heading
factionstring'police', 'ems', 'fib' or 'any'
minGradenumberMinimum grade
onDutybooleanRequires being on duty
distancenumberInteraction distance. 2.0 by default
enabledbooleanfalse hides the point
slots, weight, personalstashSize of the stash; personal = true gives each member a private one
itemsarmoryList of { name, price, count, grade }
event, servereventEvent to trigger; server = true triggers it on the server
npctableOptional. Turns the point into an NPC (needs cuxial_interactions)

Armouries need ox_inventory.

The npc table has enabled, model, scenario, name, role, greeting and group. Points with the same group share one NPC, with one button per point. Without cuxial_interactions the point stays a target zone.

config.stationNpc holds the defaults for those NPCs: model, scenario, spawnDistance (default 60.0) and the lists of models and scenarios offered by the editor.

Police tools ​

OptionSectionDefaultWhat it does
surrender.maxDistanceconfig.surrender15.0Maximum distance to ask a player to surrender
catear.cooldownconfig.catear5Seconds between two pat-downs
catear.maxDistanceconfig.catear2.5Maximum distance to pat down a player
ankle.tickMsconfig.ankle3000How often the position of an ankle monitor is sent, in milliseconds
ankle.placeDistanceconfig.ankle3.0Maximum distance to place a monitor
ankle.shockCooldownMsconfig.ankle5000Minimum time between two shocks to the same wearer
fingerprint.pointsconfig.fingerprintexamplePositions of the fingerprint scanners
fingerprint.interactDistanceconfig.fingerprint1.0Distance to use a scanner
fingerprint.broadcastRadiusconfig.fingerprint25.0Radius in which the scan is shown to other players
fingerprint.cooldownconfig.fingerprint10000Milliseconds between two scans
fingerprint.clientCooldownconfig.fingerprint2000Milliseconds between two attempts to use a reader from the same client
fingerprint.closeKeyconfig.fingerprint'BACK'Key that closes the scanner
operations.allowedDurationsMinconfig.operations{ 10, 20, 30 }Durations accepted for a map zone, in minutes. The tablet offers 10, 20 and 30
duty.pollIntervalMsconfig.duty2500How often the positions of on-duty members are refreshed for distant blips
duty.moveThresholdMconfig.duty15.0Metres a member must move before the position is sent again
duty.orphanCleanupSecconfig.duty1800Seconds after which a duty entry left open is closed

The data lists of the police tools are edited as whole sections:

SectionTitle in the tabWhat it holds
data.illegalitemsObjetos ilegalesItems a pat-down reports, as { name, label }
data.policeobjectsObjetos policialesCatalogue of placeable props, by category
data.trafficTráficoTraffic control points: maxPoints (24), radius, radiusMin, radiusMax, colours and markers
data.cuffsEsposasCuff prop, animations and maxDistance (1.5)
data.escortEscoltarEscort animation, attach offset and maxDistance (1.5)
data.lockpickGanzúaDifficulty of the skill checks and maxDistance (3.0)
data.surrenderRendición (datos)Animations, cancelKey ('X'), requestTimeoutMs, requestCooldownMs
data.cctvCámaras CCTVProp models treated as CCTV cameras
data.photoCámara (datos)Camera prop, zoom, rotation and timings of the photo mode
data.vehicledataDatos de vehículosNames of vehicle classes and colours shown in the vehicle file
data.divisions, data.condecorates, data.badgesDivisiones, Condecoraciones, PlacasDivisions, medals and badge templates of the police

Prison ​

Section config.prison (Prisión). It applies only when rcore_prison is not running.

OptionTypeDefaultWhat it does
prison.monthSecondsnumber60Real seconds one month of sentence lasts
prison.jailCoordsvector4exampleWhere an inmate is placed
prison.releaseCoordsvector4exampleWhere a released inmate appears

EMS ​

Sections config.medical (Médico) and config.appointments (Citas y recepciones).

OptionTypeDefaultWhat it does
medical.reviveEventstring | falsefalseClient event triggered by medicines that revive. false uses the native revive
medical.hospitalPhonestringexampleNumber that sends the appointment SMS through lb-phone
appointments.reminderMinutesBeforenumber60Minutes before the appointment when the reminder is sent
appointments.defaultDurationMinnumber20Default length of an appointment
appointments.noShowGraceMinnumber30Minutes after the end of the slot before it is marked as no-show
appointments.noShowRegressbooleantrueA missed cure appointment moves the cure plan one step back
appointments.checkInEarlyMinnumber60How early the patient can check in
appointments.checkInRadiusnumber8.0Metres from a reception within which check-in is accepted
appointments.autoNextStepbooleantrueClosing a cure appointment creates the next one of the plan
appointments.autoBillbooleanfalseBills the patient on closing, using prices
appointments.defaultHospitalstring'Pillbox Hill Medical Center'Hospital name written on new appointments
appointments.pricestableexamplePrice per appointment type; 0 is free
appointments.receptionstableexampleReception points: coords, size, heading, label

Federal agency addon ​

Section config.fib (Addon FIB), key addons.fib.

OptionTypeDefaultWhat it does
enabledbooleantruefalse: the third faction does not exist. Needs a restart
jobstableexampleJobs that belong to the federal faction
labelstringconfigurableName of the agency
policeReportsbooleantrueThe federal agency sees police reports as read-only, on top of its own
caseNumberPrefixstringconfigurablePrefix of the case number, followed by year and sequence
clearancetable0→0, 1→2, 2→4, 3→6Minimum grade to see a case of each classification. The case team always sees it
gangResourcestring'cuxial_gang'Resource that provides the criminal organisations

Intelligence ​

OptionDefaultWhat it does
intel.autofalsefalse: intelligence and heat rise only with the agency's work. true: police and gang activity also count, using weights and heat
intel.manualtableIntelligence points per piece of work (suspect, confirmation, act, verified act, proof, place)
intel.manualHeattableHeat points per piece of work
intel.manualCapstableMaximum pieces of each kind that score per organisation; 0 is no limit
intel.maxIntel100Top of the intelligence meter
intel.decayPerHour1.5Intelligence lost per hour once the organisation is idle
intel.idleHoursBeforeDecay6Hours without events before intelligence starts to drop
intel.heatDecayPerHour3Heat lost per hour
intel.layerstableIntelligence needed to unlock each layer of the organisation profile

Warrants and operations ​

OptionDefaultWhat it does
warrants.durationHoursarrest = 72, search = 24, surveillance = 48Hours a signed warrant lasts
ops.requireWarranttrueRaids and seizures need an active search warrant
ops.seizeStashtrueThe stash objective empties the organisation's real stash
ops.seizeDirtyMoneytrueThe money objective seizes the organisation's dirty money
ops.cooldownHours24Minimum hours between two completed operations on the same organisation
ops.minSuccessRatio0.5Share of objectives (0 to 1) needed for the operation to count as a strike
ops.strikeLoyalty60Loyalty the organisation loses in its territories after a strike

Devices ​

OptionDefaultWhat it does
devices.itemsfib_camera, fib_mic, fib_gps, WEAPON_DIGISCANNERItem of each device and weapon used as detector. Needs a restart
devices.modelstableProp models offered when placing a camera or a microphone
devices.placeDistance4.0Maximum distance to place a camera or microphone
devices.pickupDistance3.0Distance to pick up your own device and get the item back
devices.gpsAttachDistance3.0Maximum distance to the vehicle to attach a tracker
devices.maxActive4 eachActive devices per agent and type
devices.batteryHourscamera = 48, mic = 24, gps = 72Hours a device works
devices.micRadius8.0Metres a microphone picks up
devices.micTickMs2000How often an active microphone updates, in milliseconds
devices.gpsTickMs3000How often a tracker position updates, in milliseconds
devices.gpsTrailMax240Trail points kept per tracker
devices.gpsTrailMinMove6.0Minimum metres between two trail points
devices.detectorradius = 30.0, removeDistance = 2.0, cooldownMs = 800Range of the detector, distance to remove a device and milliseconds between two sweeps
devices.intelOnPlace2Intelligence added by placing a device on an organisation
devices.heatOnLost3Heat the organisation gains when it removes a device
devices.tuneOffsetsfalsetrue: while looking through a placed camera you can adjust the lens position of each model in game; the values are printed in the F8 console so you can copy them to devices.models
devices.placementtableBehaviour of the placement preview: distances, rotation and depth steps, line of sight, blocking by peds and vehicles, install time (installMs, 3500) and valid and invalid colours

Dismantling requirements ​

The dismantle table is never sent to players. A requirement set to 0 (or leader = false) is switched off.

OptionDefaultWhat it does
dismantle.membersPct80Percentage of the real members that must be confirmed
dismantle.leadertrueThe real leader must be confirmed
dismantle.acts30Criminal acts recorded
dismantle.actsMulti8Acts with at least actsMultiPeople (2) confirmed members involved
dismantle.actsSolid15Acts with a proof and a supervisor's approval
dismantle.evidence10Physical evidence linked
dismantle.zones1Operation zones: territories with at least zoneActs (5) acts
dismantle.places2Places located
dismantle.officerKidnapSolid, officerKidnapCap3, 9Aggravating factor: each officer kidnapping act with proof and approval counts as officerKidnapSolid solid acts, up to officerKidnapCap in total
dismantle.manualActKinds9 kindsAct kinds the agency can pick when recording one (drug sale, laundering, weapons, kidnapping, officer kidnapping, extortion, robbery, homicide, other). false hides a kind
dismantle.manualActsNeedVerifytrueAn act counts only after approval
dismantle.verifyNotCreatortrueWhoever records an act cannot approve it
dismantle.solidMinProofs1Minimum attached proofs to approve an act
dismantle.maxManualActsPerDay5Acts recorded per day and organisation
dismantle.maxActPeople12Maximum people involved per act
dismantle.maxSuspects60Unconfirmed suspects per organisation
dismantle.maxProofs300Maximum proofs per organisation
dismantle.maxPlaces20Places marked by hand per organisation
dismantle.placeMinDistance40.0Minimum metres between two places of the same organisation
dismantle.evidenceResource''Optional evidence resource whose cases can be attached as proof; it must provide the GetCase export. '' leaves only reports
dismantle.videoDomains{}Domains accepted for video proofs. Empty accepts any
dismantle.capturecontrol = 38, keyLabel = 'E', seconds = 120Proof photo: armed from the tablet and taken with this GTA control within the given seconds. keyLabel is the text shown
dismantle.requestNoteMin20Minimum characters of the request note
dismantle.requestCooldownHours24Wait before requesting again after a denial
dismantle.limitsnote = 500, title = 120, text = 1000, url = 512, request = 1000Maximum length of notes, titles, texts, links and requests in the file

Forensics ​

Section config.evidence (Forensics). Connects the tablet to a compatible evidence system and shows the Forensics tab: evidence and chain of custody, lab, fingerprint and DNA profiles, registered firearms, forensic cases and photos. Without that resource started the tab has no data and the rest of the tablet works the same.

OptionTypeDefaultWhat it does
evidence.enabledbooleanfalsetrue shows the Forensics tab once a compatible evidence system is installed; false removes the tab and the forensic data from the tablet
evidence.factionstablefib = true, police = falseFactions that use forensics
evidence.resourcestringconfigurableName of the evidence resource that provides the data. Set it to the folder name of your evidence system

Forensics permissions are the evidence (police) and fib_evidence (federal agency) groups; see Commands & permissions.

System ​

OptionSectionDefaultWhat it does
photo.uploadUrlconfig.photoconfigurableAddress photos are uploaded to
photo.maxUploadBytesconfig.photo4000000Maximum size of an encoded photo, in bytes. Larger ones are rejected
photo.uploadTimeoutMsconfig.photo15000Milliseconds before an upload is given up
retention.plateChecksDaysconfig.retention30Days plate checks are kept
retention.usageLogDaysconfig.retention7Days the medicine usage log is kept
retention.dispensationsDaysconfig.retention180Days pharmacy dispensations are kept
limits.maxBillAmountconfig.limits10000000Highest amount of a fine or bill
limits.maxSentenceMonthsconfig.limits1200Longest sentence, in months
limits.maxPenalPriceconfig.limits10000000Highest fine of a penal code article
limits.maxTextLen, maxTitleLen, maxShortLenconfig.limits5000, 120, 32Maximum length of notes, titles and short fields

Grade permissions (data.permissions) and keys (data.keybinds) are covered in Commands & permissions.

Language ​

The language follows the ox:locale convar. The texts are in locales/en.json and locales/es.json, and both files can be edited.

Common changes ​

Add a second police job ​

In the settings tab, section config.jobs, add the job to policeJobs and to factionJobs. The result is equivalent to:

lua
policeJobs = { police = true, sheriff = true },
factionJobs = { police = 'police', sheriff = 'police', ambulance = 'ems' },

Change the colour of a faction ​

In section config.theme, set only the accent and let the rest be derived:

lua
theme = {
    police = { accent = '#3b82f6' },
}

Make sentences longer ​

In section config.prison, one month of sentence lasting five real minutes:

lua
prison = { monthSeconds = 300 }

Turn the federal agency off ​

In section config.fib, set enabled to false and restart the resource.

© Cuxial