Athena.controllers.staticPed ​
Functions ​
addToPlayer ​
Usage
Athena.controllers.staticPed.addToPlayer(player
, pedData
): string
Add a single ped that only a single player can see
Returns a uid or generates one if not specified.
Example ​
const uid = Athena.controllers.staticPed.addToPlayer(somePlayer, { model: 'g_f_importexport_01', pos: { x: 0, y: 0, z: 0} })
Athena.controllers.staticPed.addToPlayer(somePlayer, { uid: 'the-id-you-specified', model: 'g_f_importexport_01', pos: { x: 0, y: 0, z: 0} })
Parameters ​
Name | Type | Description |
---|---|---|
player | Player | An alt:V Player Entity |
pedData | IPed |
Returns ​
string
Defined in ​
server/controllers/staticPed.ts:138
append ​
Usage
Athena.controllers.staticPed.append(pedData
): string
Create a global static ped for the server.
A static pedestrian does not move, and simply stands there.
- Returns a uid or generates one if not specified.
Example ​
const uid = Athena.controllers.staticPed.append({ model: 'g_f_importexport_01', pos: { x: 0, y: 0, z: 0} })
Athena.controllers.staticPed.append({ uid: 'the-id-you-specified', model: 'g_f_importexport_01', pos: { x: 0, y: 0, z: 0} })
Parameters ​
Name | Type |
---|---|
pedData | IPed |
Returns ​
string
uid A unique string for the ped
Defined in ​
server/controllers/staticPed.ts:53
override ​
Usage
Athena.controllers.staticPed.override(functionName
, callback
): any
Used to override any static ped streamer functionality.
Parameters ​
Name | Type |
---|---|
functionName | "append" |
callback | (pedData : IPed ) => string |
Returns ​
any
Defined in ​
server/controllers/staticPed.ts:180
Usage
Athena.controllers.staticPed.override(functionName
, callback
): any
Used to override any static ped streamer functionality.
Parameters ​
Name | Type |
---|---|
functionName | "remove" |
callback | (uid : string ) => boolean |
Returns ​
any
Defined in ​
server/controllers/staticPed.ts:181
Usage
Athena.controllers.staticPed.override(functionName
, callback
): any
Used to override any static ped streamer functionality.
Parameters ​
Name | Type |
---|---|
functionName | "addToPlayer" |
callback | (player : Player , pedData : IPed ) => string |
Returns ​
any
Defined in ​
server/controllers/staticPed.ts:182
Usage
Athena.controllers.staticPed.override(functionName
, callback
): any
Used to override any static ped streamer functionality.
Parameters ​
Name | Type |
---|---|
functionName | "removeFromPlayer" |
callback | (player : Player , uid : string ) => any |
Returns ​
any
Defined in ​
server/controllers/staticPed.ts:183
playAnimation ​
Usage
Athena.controllers.staticPed.playAnimation(uid
, animation
): void
Make a pedestrian play a specific animation.
Example ​
Athena.controllers.staticPed.playAnimation('the-id-you-specified', playAnimation('test',
{
dict: 'mp_ped_interaction',
name: 'hugs_guy_a',
duration: 2000,
flags: 0,
},
);
Parameters ​
Name | Type | Description |
---|---|---|
uid | string | A unique string |
animation | Animation |
Returns ​
void
Defined in ​
server/controllers/staticPed.ts:170
remove ​
Usage
Athena.controllers.staticPed.remove(uid
): boolean
Remove a global pedestrian
Example ​
Athena.controllers.staticPed.remove(someUid)
Athena.controllers.staticPed.remove('the-id-you-specified');
Parameters ​
Name | Type | Description |
---|---|---|
uid | string | A unique string |
Returns ​
boolean
Defined in ​
server/controllers/staticPed.ts:80
removeFromPlayer ​
Usage
Athena.controllers.staticPed.removeFromPlayer(player
, uid
): any
Remove a pedestrian from a player.
Example ​
Athena.controllers.staticPed.removeFromPlayer(somePlayer, someUid)
Athena.controllers.staticPed.removeFromPlayer(somePlayer, 'the-id-you-specified');
Parameters ​
Name | Type | Description |
---|---|---|
player | Player | An alt:V Player Entity |
uid | string | A unique string |
Returns ​
any