Skip to content
On this page

Athena.controllers.marker

Functions

addToPlayer

Usage

Athena.controllers.marker.addToPlayer(player, marker): string

Add a marker to a single local player.

Example

ts
Athena.controllers.marker.addToPlayer(somePlayer, {
     type: 1,
     color: new alt.RGBA(0, 255, 0, 100),
     pos: { x: 0, y: 0, z: 0}
});

Parameters

NameTypeDescription
playerPlayerAn alt:V Player Entity
markerMarker

Returns

string

uid A unique string for marker

Defined in

server/controllers/marker.ts:150


append

Usage

Athena.controllers.marker.append(marker): string

Adds a global marker for all players.

Returns a uid or generates one if not specified.

Example

ts
const uid = Athena.controllers.marker.append({
     type: 1,
     color: new alt.RGBA(0, 255, 0, 100),
     pos: { x: 0, y: 0, z: 0}
});

Athena.controllers.marker.append({
    uid: 'the-uid-you-specified',
     type: 1,
     color: new alt.RGBA(0, 255, 0, 100),
     pos: { x: 0, y: 0, z: 0}
});

Parameters

NameType
markerMarker

Returns

string

uid A unique string for marker

Defined in

server/controllers/marker.ts:67


override

Usage

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

Used to override any marker streamer functionality

Parameters

NameType
functionName"append"
callback(marker: Marker) => string

Returns

any

Defined in

server/controllers/marker.ts:169

Usage

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

Used to override any marker streamer functionality

Parameters

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

Returns

any

Defined in

server/controllers/marker.ts:170

Usage

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

Used to override any marker streamer functionality

Parameters

NameType
functionName"addToPlayer"
callback(player: Player, marker: Marker) => string

Returns

any

Defined in

server/controllers/marker.ts:171

Usage

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

Used to override any marker streamer functionality

Parameters

NameType
functionName"removeFromPlayer"
callback(player: Player, uid: string) => any

Returns

any

Defined in

server/controllers/marker.ts:172


remove

Usage

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

Removes a global marker from all players based on the global uid.

Example

ts
Athena.controllers.marker.remove(someUid);

Athena.controllers.marker.remove('the-uid-you-specified');

Parameters

NameTypeDescription
uidstringA unique string

Returns

boolean

Defined in

server/controllers/marker.ts:94


removeFromPlayer

Usage

Athena.controllers.marker.removeFromPlayer(player, uid): any

Remove a marker from a single local player.

Returns a uid or generates one if not specified.

Example

ts
Athena.controllers.marker.removeFromPlayer(somePlayer, someUid);

Parameters

NameTypeDescription
playerPlayerAn alt:V Player Entity
uidstringA unique string

Returns

any

Defined in

server/controllers/marker.ts:122

Created by Stuyk | Est. 2020