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 ​
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 ​
Name | Type | Description |
---|---|---|
player | Player | An alt:V Player Entity |
blipData | Blip |
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 ​
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 ​
Name | Type |
---|---|
blip | Blip |
Returns ​
string
A uid to remove it later.
Defined in ​
override ​
Usage
Athena.controllers.blip.override(functionName
, callback
): any
Used to override any blip controller function.
Parameters ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Name | Type |
---|---|
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 ​
Athena.controllers.blip.populateGlobalBlips(somePlayer);
Parameters ​
Name | Type | Description |
---|---|---|
player | Player | An 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 ​
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 ​
Name | Type | Description |
---|---|---|
uid | string | A unique string |
Returns ​
boolean
Defined in ​
removeFromPlayer ​
Usage
Athena.controllers.blip.removeFromPlayer(player
, uid
): any
Remove a blip from the player. Do not worry about removing blips on disconnect.
Example ​
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 ​
Name | Type | Description |
---|---|---|
player | Player | An alt:V Player Entity |
uid | string | A unique string |
Returns ​
any