EmergencyCall

API reference for EmergencyCall in @erlcjs/core.

Represents an active emergency call in the ER:LC server.

Signature:

declare class EmergencyCall extends Base

Extends: Base

#Constructors

Constructor

Modifiers

Description

(constructor)(server, data)

Creates an instance of EmergencyCall.

#Properties

Property

Modifiers

Type

Description

caller?

Player

(Optional) The Player instance representing the caller, if they are still cached.

callerId

number

The UserId of the player who made the emergency call.

callNumber

number

The unique call number.

description

string

The description text of the emergency call.

playerIds

number[]

Array of UserIds of responders assigned to this call.

players

Player[]

Array of Player instances of active responders assigned to this call.

position

number[]

The game position coordinates [x, y] of the call.

positionDescriptor

string

Positional description of where the call was made.

startedAt

number

Unix timestamp of when the call was started.

team

string

The team associated with the emergency call (e.g., "Police", "Fire").

#Methods

Method

Modifiers

Description

_patch(data)

Patches the EmergencyCall structure with new raw data.

toJSON()

Converts this EmergencyCall instance to raw JSON representation.