Skip to content

five-on-it / packages/protocol/src/police / encodePolice

Function: encodePolice() ​

encodePolice(message): string

Defined in: packages/protocol/src/police.ts:145

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.

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™).

tracked ​

boolean = ...

The car the player sits in carries a GPS tag.

type ​

"police" = ...

Returns ​

string