Kartik Scripts

Installation

Requirements

  • ox_lib
  • oxmysql
  • qbx_core, qb-core or es_extended
  • Optional: kartik-mdt (MDT V2, 2.4.0+ for the tablet app), ps-dispatch / cd_dispatch, nearest-postal

Steps

  1. Download the package from your Cfx portal.
  2. Put kartik-ers in your resources folder.
  3. Start it after your framework, MDT and dispatch in server.cfg:
ensure ox_lib
ensure oxmysql
ensure qbx_core
ensure kartik-mdt
ensure kartik-ers
  1. Set your jobs, keys and locations in shared/config.lua. See General configuration.
  2. Restart the server. Database tables are created on first start. You can also import [SQL]/kartik-ers.sql yourself.

The language comes from ox_lib: add setr ox:locale "en" to server.cfg. Locale files are in locales/.

Kartik MDT

With Kartik MDT V2 running, the ERS tablet becomes an ERS app inside the MDT, like the police and evidence tablets. The tablet key opens the MDT on it, so officers carry one tablet.

SettingEffect
Config.TabletMode = 'auto'ERS app inside the MDT when it runs, else the built-in tablet (default)
Config.TabletMode = 'ers'Always the built-in tablet on the tablet key
Config.MdtTablet = falseRemoves the ERS app from the MDT

Who can open the tablet is decided by CanOpenTablet() in client/open/functions.lua. Jobs without MDT access (tow, mechanic) get the built-in tablet.

First steps after installing

  1. Check Config.Services: every job that should work a service must be listed. Job names must match your framework exactly.
  2. Move Config.Locations.jails and Config.Locations.hospitals to your MLOs if you use custom ones. Do the same for Config.Tow.dropOffs.
  3. Decide on a tablet key (Config.Keys.tablet), or tell players to use /ers.
  4. Give dispatchers access: a job grade in Config.Dispatcher.jobs, or the kartik-ers.dispatcher ace.
  5. Join, start a shift and press Request callout to test.

Database

TableWhat it holds
ers_pedsNPC identities
ers_vehiclesNPC vehicle registrations
ers_statsCareer totals per player
ers_logsActivity per player

On this page