Skip to content
On this page

Athena.controllers.blip

Functions

addToPlayer

Usage

Athena.controllers.blip.addToPlayer(player, blipData): any

Add a blip to the player. Only the player specified can see this blip.

Returns a uid or generates one if not specified.

Example

ts
const uid = Athena.controllers.blip.addToPlayer(somePlayer, {
    color: 5,
    pos: { x: 0, y: 0, z: 0},
    scale: 0.2,
    shortRange: true,
    text: 'My Blip!',
    sprite: 80
});

Parameters

NameTypeDescription
playerPlayerAn alt:V Player Entity
blipDataBlip

Returns

any

Defined in

server/controllers/blip.ts:146


append

Usage

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

Adds a global blip the player loads when they join.

Returns a uid or generates one if not specified.

Example

ts
const uid = Athena.controllers.blip.append({
    color: 5,
    pos: { x: 0, y: 0, z: 0},
    scale: 0.2,
    shortRange: true,
    text: 'My Blip!',
    sprite: 80
});

Parameters

NameType
blipBlip

Returns

string

A uid to remove it later.

Defined in

server/controllers/blip.ts:33


override

Usage

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

Used to override any blip controller function.

Parameters

NameType
functionName"append"
callback(blip: Blip) => string

Returns

any

Defined in

server/controllers/blip.ts:185

Usage

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

Used to override any blip controller function.

Parameters

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

Returns

any

Defined in

server/controllers/blip.ts:186

Usage

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

Used to override any blip controller function.

Parameters

NameType
functionName"addToPlayer"
callback(player: Player, blipData: Blip) => any

Returns

any

Defined in

server/controllers/blip.ts:187

Usage

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

Used to override any blip controller function.

Parameters

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

Returns

any

Defined in

server/controllers/blip.ts:188

Usage

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

Used to override any blip controller function.

Parameters

NameType
functionName"populateGlobalBlips"
callback(player: Player) => any

Returns

any

Defined in

server/controllers/blip.ts:189


populateGlobalBlips

Usage

Athena.controllers.blip.populateGlobalBlips(player): any

Used to load all blips on client-side for a player. This is already called when the gamemode starts. Not necessary to call twice.

Example

ts
Athena.controllers.blip.populateGlobalBlips(somePlayer);

Parameters

NameTypeDescription
playerPlayerAn alt:V Player Entity

Returns

any

Defined in

server/controllers/blip.ts:170


remove

Usage

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

Removes a blip based on uid.

Example

ts
const uid = Athena.controllers.blip.append({
    color: 5,
    pos: { x: 0, y: 0, z: 0},
    scale: 0.2,
    shortRange: true,
    text: 'My Blip!',
    sprite: 80
});

Athena.controllers.blip.remove(uid);

Parameters

NameTypeDescription
uidstringA unique string

Returns

boolean

Defined in

server/controllers/blip.ts:73


removeFromPlayer

Usage

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

Remove a blip from the player. Do not worry about removing blips on disconnect.

Example

ts
const uid = Athena.controllers.blip.addToPlayer(somePlayer, {
    color: 5,
    pos: { x: 0, y: 0, z: 0},
    scale: 0.2,
    shortRange: true,
    text: 'My Blip!',
    sprite: 80
});

Athena.controllers.blip.removeFromPlayer(somePlayer, uid);

Parameters

NameTypeDescription
playerPlayerAn alt:V Player Entity
uidstringA unique string

Returns

any

Defined in

server/controllers/blip.ts:110

Created by Stuyk | Est. 2020