Skip to content
On this page

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

ts
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

NameTypeDescription
playerPlayerAn alt:V Player Entity
pedDataIPed

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

ts
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

NameType
pedDataIPed

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

NameType
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

NameType
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

NameType
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

NameType
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

ts
Athena.controllers.staticPed.playAnimation('the-id-you-specified', playAnimation('test',
     {
         dict: 'mp_ped_interaction',
         name: 'hugs_guy_a',
         duration: 2000,
         flags: 0,
     },
);

Parameters

NameTypeDescription
uidstringA unique string
animationAnimation

Returns

void

Defined in

server/controllers/staticPed.ts:170


remove

Usage

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

Remove a global pedestrian

Example

ts
Athena.controllers.staticPed.remove(someUid)

Athena.controllers.staticPed.remove('the-id-you-specified');

Parameters

NameTypeDescription
uidstringA 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

ts
Athena.controllers.staticPed.removeFromPlayer(somePlayer, someUid)

Athena.controllers.staticPed.removeFromPlayer(somePlayer, 'the-id-you-specified');

Parameters

NameTypeDescription
playerPlayerAn alt:V Player Entity
uidstringA unique string

Returns

any

Defined in

server/controllers/staticPed.ts:110

Created by Stuyk | Est. 2020