Skip to content
On this page

Athena.controllers.doors

Functions

append

Usage

Athena.controllers.doors.append(door): string

Append door information to be controlled.

Returns the door uid to remove all door controls if necessary.

All doors in the game are already added to the gamemode by default.

Example

ts
const uid = Athena.controllers.doors.append({
  uid: 'my-cool-door-or-whatever',
  description: 'Pacific Standard Bank Main Right Door',
  isUnlocked: true,
  model: 110411286,
  pos: { x: 232.6054, y: 214.1584, z: 106.4049 },
});

Parameters

NameType
doorDoor

Returns

string

Defined in

server/controllers/doors.ts:71


override

Usage

Athena.controllers.doors.override(functionName, callback): any

Used to override any door streamer functionaltiy

Parameters

NameType
functionName"append"
callback(door: Door) => string

Returns

any

Defined in

server/controllers/doors.ts:157

Usage

Athena.controllers.doors.override(functionName, callback): any

Used to override any door streamer functionaltiy

Parameters

NameType
functionName"remove"
callback(uid: string) => boolean

Returns

any

Defined in

server/controllers/doors.ts:158

Usage

Athena.controllers.doors.override(functionName, callback): any

Used to override any door streamer functionaltiy

Parameters

NameType
functionName"update"
callback(uid: string, isUnlocked: boolean) => Promise<boolean>

Returns

any

Defined in

server/controllers/doors.ts:159


remove

Usage

Athena.controllers.doors.remove(uid): boolean

Remove all controls from a door.

Example

ts
// uid is a variable here
Athena.controllers.doors.remove(uid);

Parameters

NameTypeDescription
uidstringA unique string

Returns

boolean

Defined in

server/controllers/doors.ts:97


update

Usage

Athena.controllers.doors.update(uid, isUnlocked): Promise<boolean>

Update door lock status.

Call this function to change door lock status.

Example

ts
// set to true to unlock
Athena.controllers.doors.update('117', true);

Parameters

NameTypeDescription
uidstringA unique string
isUnlockedboolean

Returns

Promise<boolean>

Defined in

server/controllers/doors.ts:127

Created by Stuyk | Est. 2020