Kartik Scripts

Installation

Requirements

  • ox_lib
  • oxmysql
  • qbx_core, qb-core or es_extended
  • A supported inventory (see Works with)
  • Optional: kartik-doj-props (courtroom TVs), kartik-mdt (MDT V2, 2.4.0+ for the tablet app), a prison (rcore_prison, dynyx_prison, tk_jail, xt-prison, qb-prison or esx_jail), ox_doorlock, pma-voice, kartik-evidence, a dispatch, phone and banking resource

Steps

  1. Download kartik-dojjob and kartik-doj-props from your Cfx portal.
  2. Put both in your resources folder.
  3. Start them after your framework, inventory and MDT in server.cfg, with the props before the job:
ensure ox_lib
ensure oxmysql
ensure qbx_core
ensure ox_inventory
ensure kartik-mdt
ensure kartik-doj-props
ensure kartik-dojjob
  1. Add the items (below).
  2. Start the server. The database tables (kdj_*) are created by themselves, the starter job doj is created in your framework and an empty "Los Santos Courthouse" is added.
  3. Join as an admin and follow First Setup.

kartik-doj-props needs a full server restart the first time: a .ytyp is not picked up by a resource restart. Without it the base-game TV is used.

Items

ImageItemWhat it is
doj_badgedoj_badgeTaken at a duty clock, shown as a card with the current rank
bar_licensebar_licenseIssued after a passed bar exam, shown as a card
court_documentcourt_documentEvery printed document (subpoenas, orders, permits, certificates)
court_claim_ticketcourt_claim_ticketGiven at the weapon check-in desk
doj_tabletdoj_tabletOnly needed when you turn on the tablet item

The images are in the [Item Images] folder of your download. Copy them to your inventory's image folder (ox_inventory: web/images/, qb-inventory: html/images/).

Copy the block for your inventory:

Paste into ox_inventory/data/items.lua, inside the returned table:

['doj_badge']           = { label = 'DOJ Badge', weight = 100, stack = false, close = true, description = 'Department of Justice identification' },
['bar_license']         = { label = 'Bar License', weight = 50, stack = false, close = true, description = 'San Andreas Bar Association membership card' },
['court_document']      = { label = 'Court Document', weight = 20, stack = false, close = true, description = 'An official court document' },
['doj_tablet']          = { label = 'DOJ Tablet', weight = 500, stack = false, close = true, description = 'Court records, cases and warrants on the go' },
['court_claim_ticket'] = { label = 'Weapon Claim Ticket', weight = 10, stack = false, close = true, description = 'Collect your checked-in weapons at the courthouse desk' },

Kartik MDT

With Kartik MDT V2 running, the DOJ shares court cases, warrants and criminal records with the police, and the DOJ tablet becomes a DOJ app inside the MDT. See The DOJ Tablet.

SettingEffect
Config.MdtResource = 'kartik-mdt'The resource name your MDT runs under
Config.CaseStore = 'auto'Cases, records and warrants in the MDT's tables when it runs, else in the DOJ's own tables
Config.CaseStore = 'mdt'Always the MDT's tables
Config.CaseStore = 'standalone'Always the DOJ's own kdj_ tables (any other MDT)

Pick a case store and keep it. Switching later does not move existing cases. For 'auto', start the MDT before kartik-dojjob.

Language

The language comes from ox_lib: add setr ox:locale "en" to server.cfg. Locale files are in locales/. Copy en.json to your language code (for example de.json) and translate the values.

Database

Everything is created on first start and kept up to date by migrations. The main tables:

TableWhat it holds
kdj_courthousesCourthouses and their placed points
kdj_court_cases, kdj_case_meta, kdj_case_stagesCases (standalone store), their type, court and stage
kdj_criminal_records, kdj_warrantsRecords and warrants (standalone store)
kdj_sessionsCourt sessions and transcripts
kdj_case_counsel, kdj_exhibits, kdj_exhibit_logCounsel, exhibits and chain of custody
kdj_subpoenas, kdj_motions, kdj_ordersSubpoenas, motions and court orders
kdj_templates, kdj_documentsDocument templates and written documents
kdj_jurors, kdj_jury_summonsJury pool and summons
kdj_bar_members, kdj_bar_attempts, kdj_bar_questions, kdj_retainersBar association
kdj_appointments, kdj_forms, kdj_permitsKiosk requests, forms and permits
kdj_supervision, kdj_lawyer_requestsProbation, parole, community service and lawyer calls
kdj_duty_log, kdj_transactions, kdj_audit_logHours, department account and audit log
kdj_settingsChanges made in /dojadmin

On this page