Koja Scripts

Features

A walkthrough of koja-dispatcher for dispatchers, field units and staff: shifts, the CAD, calls, incidents, the map, units, pursuits, MCI, voice, ranks, stats and training.

Features

This page walks through the dispatcher job as players and staff use it. Server options are in Configuration and Admin menu, keys in Commands and keybinds.

For dispatchers

Starting a shift

Walk up to a dispatch station. When you get close, the screen over the desk shows the station name, whether it is free or who is working there, and how to start (with a target resource you aim at the desk, otherwise you press E). You need one of the jobs allowed to dispatch at the minimum grade.

When the shift starts:

  • Your character sits or stands at the desk, and your framework duty is set on.
  • The intro plays: the camera flies in from an establishing shot over the building, past your shoulder and onto the monitor, with a letterbox and title card. Press Space or Enter to skip it, or turn it off for yourself in the CAD settings.
  • The CAD boots with a short terminal log: your name, units on the grid, open incidents and your service record.

Only one dispatcher can use a station at a time, and the number of dispatchers on shift can be limited. If your server allows the remote CAD, /cad opens a shift anywhere without a station.

Your shift ends when you press End shift, and also when you die, walk away from the desk, an admin ends all shifts or the station is deleted. You then see the shift report: minutes on the console, calls answered, incidents resolved and failed, missed or dropped calls, correct classifications and instructions, pranks caught, score, star rating and pay.

Press Esc to minimise the CAD and F7 to bring it back while you are still at the station.

The CAD screen

AreaWhat is there
Top barRinging calls, active incidents, free and on-duty units per department, dispatchers on shift, resolved and lost, score with a live star rating, your rank badge, the weather and time chip, and the Training, Statistics and MDT buttons, Controls (help), Settings, shift clock, End shift and Minimise.
Left911 lines (ringing and active calls) and the incident list (new, active, closed).
CentreThe tactical map and the radio traffic log.
RightThe call console while you are on a call; otherwise the voice dock, the selected incident, the selected units and the unit roster.
Bottom barShortcut hints (can be hidden in Settings).

Settings (saved on your PC): caller voice, interface and ringtone volume, typing sound, animated caller text, move the map to the caller when answering, 2D or 3D map, performance mode for the 3D map (20 fps and lower resolution), see vehicles through buildings, shortcut hints and skip the shift intro.

Taking a call

Calls ring in the 911 lines. Press Answer or Space to take the oldest one. A call is locked to whoever answers it; other dispatchers see who handles it.

At first you only see an approximate area on the map. Then work the call in the console:

  1. Ask. Eight questions: location, what happened, anyone hurt, conscious and breathing, weapons, suspects, anyone trapped, smoke. Asking for the location pins the exact spot. Other answers reveal hidden needs, for example an injured person adds an ambulance, a weapon adds police.
  2. Instruct. Seven pre-arrival instructions: CPR, pressure on the wound, recovery position, evacuate, hide, stay away, stay on the line. The right one slows the incident down and scores points; a wrong one speeds it up and costs points. You give one instruction per call.
  3. Classify. Pick the category (robbery, burglary, assault, shooting, domestic, disturbance, suspicious, medical, overdose, fire, traffic, rescue, hostage, pursuit, officer down, hazmat, and mass casualty). The right category scores points.
  4. Priority. P1 life threatening, P2 urgent, P3 routine.
  5. Planned response. The units per department the incident needs. Add a note for units if you want.
  6. Dispatch. Creates the incident on the map.

Prank ends a prank call and scores points; using it on a real emergency costs double. Hang up drops the call; on a generated call that is a missed call. A caller you never answer hangs up after the patience time and costs points.

Callers speak with recorded voices (10 female, 10 male). How panicked they sound follows the scenario. Lines without a recording are shown as text.

Text 911 calls from real players show the player's message and live position. Type in the reply box to ask questions or give instructions; the caller gets them as notifications (or as phone messages when they called from a phone). With a voice resource you can also talk to the caller, see Voice calls.

Live AI callers (when the server has them on) answer anything you type in the call log, and Hold to talk lets you speak into your microphone. The question and instruction buttons keep working. Scoring is the same as for scripted calls.

With the career module, higher ranks can hold more than one call at once and switch between lines. Calls of some categories need a rank, see Ranks.

Incidents

Every incident has two bars:

  • Progress fills while units work on scene, weighted by what the incident needs.
  • Danger rises while the incident does not have enough help. When it fills, the incident fails.

Ignore an incident and it escalates (the robber opens fire, the fire spreads) and finally fails. Units that reach a scene whose exact location was never asked search the area first. Hidden needs are radioed in when units arrive.

In the incident detail you see elapsed time, needs (assigned / required), assigned units and units on scene, the note, and the actions Auto-assign (nearest fitting free units), Send selected, Release unit, Cancel incident and Show on map. Press M (or the place button) and click the map to create an incident by hand.

An incident ends as resolved, failed or cancelled. Field units can also close it with /code4 from the scene.

The map

The map is a satellite map of San Andreas with every on-duty police, EMS and fire unit, incidents, call areas and the planned route of AI units with distance and ETA. Toggle layers for callsigns, units, incidents, calls, civilians and NPC peds (when the server allows them).

Switch between the 2D map and the 3D tactical view. The 3D view draws the map over the terrain with extruded buildings; rotate it with Q / E or Alt + right-drag. Buildings in front of vehicles fade out when See vehicles through buildings is on.

RTS controls:

InputAction
Click / drag a boxSelect units
Shift + clickAdd to the selection
Right-click an incidentSend the selected units to it
Right-click the mapMove the selected units there (staging point)
Ctrl + 1-9, then 1-9Save the selection as a group, select the group and jump to it
Double click or FFollow a unit
TabCycle active incidents by priority
HRecall the selected units to their station
WASD or arrows, wheel, + / -Pan and zoom

The selection panel can also change a unit's callsign; player callsigns are saved.

Units

AI fleet. Patrol cars, K9, SWAT, a police helicopter, ambulances, an air ambulance, engines and ladders start at their stations. Ground units drive along the game's road network at realistic speeds; helicopters fly straight. They work the scene, ambulances take patients to a hospital, and everyone returns to base. When enough real players of a department are on duty, that department's AI goes off duty.

Player units. Players with a police, EMS or fire job who are on duty appear on the map with their callsign and live position. With koja-mdt they follow MDT duty and use their MDT callsign.

The roster on the right lists all units with a filter for free units. Unit statuses: available, busy, unavailable, en route, searching, on scene, transport, returning, off duty.

Pursuits

Pursuit calls (stolen car, robbery getaway, a drunk driver who flees) and some escalating robberies, burglaries, assaults, shootings, hostage and domestic incidents get a moving suspect vehicle. The suspect drives away along the roads toward an escape point, faster than a patrol car.

  • Units that come within visual range see the suspect (helicopters from much further). Without a visual for 40 seconds the suspect is lost; if nobody ever spots it, it is lost after 4 minutes.
  • Place spike strips and roadblocks ahead of the suspect: pick the tool and click a road, or use the right-click menu. Each pursuit has a limited number of each. A spike strip slows the suspect; a roadblock can stop it, otherwise it turns away.
  • A slowed or stopped suspect is caught when units box it in for a few seconds. Suspects in sight can also crash.

The pursuit card shows the state (fleeing, slowed, stopped, caught, lost), suspect speed, last visual, units in sight and the remaining tools. Only a limited number of pursuits run at once.

Patrol zones

Draw a polygon (click points, double-click or Enter to finish, Backspace to undo) or a circle zone on the map and name it. Drag AI units onto a zone, or pick a zone for the selected units. Idle units patrol inside the zone at a lower speed until they are dispatched. Only AI units patrol. Zones are saved and stay after a restart.

Escalation and multi-stage incidents

Some scenarios change while you work them:

  • Events: the caller reports something new during the call ("He's got a gun now!", another victim, the caller goes silent), or the incident gets new facts after dispatch. The CAD shows an alert, the needs or priority change and a radio line is added.
  • Stages: when one stage reaches 100 % the incident continues with the next one, for example a structure fire, then injured residents to transport, then a gas leak. Units stay on scene and missing units are requested over the radio. The stage badge shows the current stage.

Weather and time of day

Generated calls follow the in-game hour and weather: more collisions in rain, fog and snow, more fights, drunk drivers and burglaries at night, more medical calls and brush fires in the heat. The weather chip in the top bar shows the current weather, the period and what it does to the call mix.

Fatigue and damage

AI units get tired on long jobs and slower when tired. Tired units return to their station to rest after the job; exhausted units leave at once. Units on shootings, hostage situations, pursuits and assaults can be damaged and go back for repairs. The unit shows fatigue and damage meters and when it is available again. Return to base sends the selected units home.

Mass casualty incidents

An MCI has 4 to 12 patients tagged red, yellow and green. Ambulance crews stabilise red and yellow patients and transport them, green patients are treated on scene. Untreated patients get worse over time. The Triage board shows how many are in care, en route, transported and treated.

Hospitals

Each hospital has a number of beds. Transports fill them and beds free up over time. The map shows each hospital's occupancy (beds free, nearly full, full, diverted). Divert ambulances closes a hospital to new transports; Reopen opens it again. Full or diverted hospitals are skipped; when every hospital is full, the handover takes longer.

Voice calls

When you answer a 911 call from a real player and the server runs pma-voice or mumble-voip, you and the caller are put on a private voice channel. The caller sees a small 911 DISPATCH indicator with the call time. In the voice dock you can mute your microphone, put the caller on hold, transfer the call to a field unit on duty, or end the voice call. Depending on the server settings the voice call ends when you dispatch, or the caller stays on the line until you end it. The caller and units leave with /hangup911.

MDT workspace

Press B (or the MDT button) to open the MDT workspace drawer, like a second monitor.

TabWhat it doesNeeds koja-mdt
BOLOIssue BOLOs (vehicle, person, general) with plate, model, colour, description, photo link and last known location picked on the map. Locate and close BOLOs. BOLOs show on the map.No (internal list without it)
PersonsSearch by name, phone or ID: flags, active warrants, criminal record, licenses, BOLOs.Yes
VehiclesLook up a plate: owner, flags, BOLOs and warrants. Set or clear the stolen and wanted flags.Yes
Call notesNotes on the MDT call linked to an incident.Yes
BulletinPost a bulletin to all departments or one, optionally pinned.Yes
MailSend MDT mail to a unit or a department.Yes
OfficersOfficers on duty with callsign, department, MDT status and CAD unit.Yes

Alerts pop up in the workspace for ALPR hits on a BOLO plate, backup requests and panic buttons, with Locate and Open BOLO buttons.

Ranks

With the career module, dispatchers earn XP from their score, resolved incidents, correct classifications and instructions, and time on shift, and lose some for missed calls and failed incidents. There are five ranks: Trainee, Dispatcher, Senior Dispatcher, Supervisor and Chief. Higher ranks get more simultaneous lines, a pay bonus and unlocks:

  • Dispatcher can answer pursuit calls.
  • Senior Dispatcher can answer hostage, officer down and mass casualty calls.
  • Supervisor can take over calls and incidents of other dispatchers. Without this rank you cannot reassign units, cancel or reprioritise an incident another dispatcher owns.

Locked calls show the rank they need. The rank badge in the top bar shows the progress to the next rank, and the shift report shows a promotion.

Statistics and heatmap

The Statistics button opens a dashboard over the last 24 hours, 7 days or 30 days: incidents, resolved, average response, units per incident, incidents by hour and per day, by category with average response, response time by department, outcomes, sources (generated, real players, API, MDT), the busiest streets and the dispatcher leaderboard. The Heatmap layer on the map shows where incidents happen, per category.

Training mode

New dispatchers are offered a training on their first shift, and anyone can start it from the Training button. It is a guided walkthrough in 12 steps (answer, ask for the location, ask what happened, give an instruction, classify, dispatch, select units, send them, progress and danger, control groups, the map camera, ending the shift) with a practice call only the trainee sees. Practice calls never affect score, pay or other dispatchers.

Score and pay

Points come from resolved incidents (with a bonus when the first unit arrives fast), correct classifications and instructions and caught pranks; failed incidents, missed calls, wrong codes and instructions and dispatched pranks cost points. The live star rating in the top bar is based on resolved versus failed and missed. Pay is per minute plus per point, scaled by the rating, and paid when the shift ends.

For field units

Calls from players

Any player can call 911 with /911 <message> (or from a supported phone). The call rings at the dispatcher with your live position. More /911 messages within a few minutes are added to the same call. The dispatcher's questions, instructions and replies reach you as notifications. If nobody is on shift, the server either tells you nobody answers, sends the nearest units automatically, or passes the call to the MDT.

Being dispatched

When the dispatcher sends you to an incident:

  • A toast shows the incident, and a flashing blip (for priority 1) with a GPS route appears.
  • Press Y to acknowledge and set the waypoint.
  • When you arrive the toast switches to On scene. Handle the scene, then /code4 clears the incident.
  • If the location changes you get a Location updated toast. If the dispatcher stages you, you get a Move to the staging point blip.
  • When the incident is closed, fails or you are released, a toast tells you.

For generated incidents the scene spawns around you when you get close: injured people, brawlers, crowds, script fires or wrecked cars.

/unitstatus available|busy|unavailable sets your status.

Field status codes

Set 10-codes with key mappings, /tencode <code> or the quick menu (press a number or click). A small chip on the HUD shows your current code.

CodeMeaning
10-8Available
10-6Busy
10-97En route
10-23On scene
10-7Out of service
10-15Suspect in custody (transport)
backupNeed backup: a priority 1 incident at your position, you and the nearest units are assigned, and with koja-mdt a 10-78 MDT call.
10-99Panic: sent through koja-mdt when it runs, otherwise a priority 1 incident here.

Backup and the panic fallback have a cooldown. With koja-mdt, your MDT status follows these codes.

Witness calls

Some things you do in the city make witnesses call 911 while a dispatcher is working: staying down for a while, shooting, and hard vehicle crashes. Not every event creates a call.

For staff

  • Set up modes, stations, jobs, limits and modules in Admin menu.
  • Write your own call scenarios and edit the AI fleet in the admin menu's Scenarios and AI fleet pages.
  • Connect koja-mdt, voice, phones, other dispatch scripts and Discord in Integrations.
  • Other resources can create calls and incidents, read units and react to events through the Developer API.