Skip to content

Installation

Install Cuxial Police step by step: dependencies, items, convars, start order and first setup.

Cuxial Police needs no SQL import. It creates its tables, adds the columns it needs and installs its default settings on first start.

Check the dependencies ​

These resources must be installed and working before you add Cuxial Police:

  • ox_lib
  • oxmysql
  • cuxial_bridge 2.18.0 or later, with your framework running
  • pma-voice

The optional integrations are listed in the Overview. Each one is detected when it is running; nothing has to be configured to enable them.

The database must be MySQL 5.7 or newer, or MariaDB 10.2 or newer. The citizen search uses a generated column.

Copy the resource ​

Place the cuxial_police folder inside your resources directory. Keep the folder name as it is: the items call exports by that name.

Add the items ​

Open install/items.lua and copy its contents into ox_inventory/data/items.lua. It holds:

  • cuxial_mdt, the tablet that opens the MDT.
  • prescription and death_certificate, the paper copies EMS hands out.
  • The pharmacy medicines and vaccines.

The item image for the tablet is install/cuxial_mdt.png; copy it to ox_inventory/web/images/.

If you use the federal agency addon, add its three surveillance items too:

ox_inventory/data/items.lua
lua
['fib_camera'] = {
    label = 'Hidden camera',
    weight = 400,
    stack = true,
    close = true,
    consume = 0,
    client = { export = 'cuxial_police.fib_camera' },
},

['fib_mic'] = {
    label = 'Hidden microphone',
    weight = 150,
    stack = true,
    close = true,
    consume = 0,
    client = { export = 'cuxial_police.fib_mic' },
},

['fib_gps'] = {
    label = 'GPS tracker',
    weight = 200,
    stack = true,
    close = true,
    consume = 0,
    client = { export = 'cuxial_police.fib_gps' },
},

The device detector is not an item of its own. By default it is the weapon WEAPON_DIGISCANNER, which must exist in your inventory's weapon list.

The last two items of install/items.lua (caja_rutina and pastilla_rutina) call exports of cuxial_diseases. Leave them out if you do not run that resource.

Set the convars ​

Both are optional.

server.cfg
cfg
# Language of the tablet and the messages
setr ox:locale "en"

# Upload token for mugshots, vehicle photos and photo proofs
set cuxial:fivemanageToken "your_token"

Photos are captured with screencapture and uploaded to the address set in photo.uploadUrl. Mugshots, vehicle photos and photo proofs require both the token and screencapture; everything else works without them.

Start the resource ​

Start Cuxial Police after its dependencies, your framework and your inventory:

server.cfg
cfg
ensure ox_lib
ensure oxmysql
# your framework here
ensure ox_inventory
ensure pma-voice
ensure cuxial_bridge
# optional integrations
ensure cuxial_medical
ensure cuxial_gang
ensure sd-computers
ensure cuxial_police

On first start the console shows the schema being created and the settings being installed with their default values.

The script adds the columns police_image, wanted, dangerous and search_text to your characters table, and wanted, description and police_image to your vehicles table. Make a database backup before the first start.

Connect gunshot alerts ​

The dispatch receives a gunshot alert when your weapons resource reports the shot. With ox_inventory it is one line in its client.lua: follow Gunshot alerts.

Set your jobs ​

The defaults expect a police job, an ambulance job and a fib job for the federal addon. If yours have other names:

  1. Edit policeJobs, emsJobs and addons.fib.jobs in install/defaults/config.lua before the first start, or
  2. start with the defaults, give yourself one of those jobs, open the tablet and change them in the settings tab: section config.jobs for police and EMS, section config.fib for the federal addon.

After the first start the values live in the database. Editing install/defaults/ no longer changes a running installation; see Configuration.

Check that it works ​

  1. Join with a police job and a staff permission.
  2. Use the cuxial_mdt item. The tablet opens with the police theme.
  3. Open the settings tab, go to the stations section (config.stations) and create a point of type duty. Go on duty there.
  4. Press F7. The quick menu opens.
  5. Type /entorno test. The alert appears in the dispatch sidebar (I shows and hides it).

Next: learn what each faction gets in the Features guide.

© Cuxial