five-on-it / packages/protocol/src/police / encodePolice
Function: encodePolice()
encodePolice(
message):string
Defined in: packages/protocol/src/police.ts:173
Serializes a player's police tells as a text frame.
Parameters
message
camera
boolean = ...
A security or traffic camera has the player in sight now.
drone
boolean = ...
The police drone has the player in sight now.
k9?
"scent" | "lost" = ...
A police dog after the player: on their scent, or off it (the trail broken in water).
lasers
object[] = ...
The marksmen's lasers painting the player now.
light
boolean = ...
The helicopter's searchlight has the player now.
marks
object[] = ...
What the minimap marks.
radio
object[] = ...
The radio's last lines the player hears, oldest first.
scanner
boolean = ...
The player carries the police scanner (PoliceScan Pro™).
talk?
{ car: boolean; seconds: number; state: "ringing" | "talking"; time: boolean; } = ...
The negotiator's call (six stars, a captive held): ringing (seconds it rings on), the talk open (its choices still on offer: more time, once; a car, once) and the team holding (seconds of holding left).
talk.car
boolean = ...
talk.seconds
number = ...
talk.state
"ringing" | "talking" = ...
talk.time
boolean = ...
tracked
boolean = ...
The car the player sits in carries a GPS tag.
type
"police" = ...
Returns
string