Skip to content
On this page

Athena.systems.inventory.weapons

Functions

addComponent

Usage

Athena.systems.inventory.weapons.addComponent(player, type, slot, component): Promise<boolean>

Add a weapon component to a weapon at a given slot.

Export

Parameters

NameType
playerPlayer
type"inventory" | "toolbar"
slotnumber
componentstring | number

Returns

Promise<boolean>

Defined in

server/systems/inventory/weapons.ts:67


get

Usage

Athena.systems.inventory.weapons.get(dataSet): player[]

Return all weapons from a given data set.

Parameters

NameType
dataSetStoredItem[]

Returns

player[]

Defined in

server/systems/inventory/weapons.ts:13


override

Usage

Athena.systems.inventory.weapons.override(functionName, callback): any

Used to override inventory item weapon functionality

Parameters

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

Returns

any

Defined in

server/systems/inventory/weapons.ts:160


removeAll

Usage

Athena.systems.inventory.weapons.removeAll(dataSet): player[]

Remove all weapons from a given data set.

Parameters

NameType
dataSetStoredItem[]

Returns

player[]

Defined in

server/systems/inventory/weapons.ts:40


update

Usage

Athena.systems.inventory.weapons.update(player): any

Looks into the item toolbar and determines what weapons to equip / unequip.

Parameters

NameTypeDescription
playerPlayerAn alt:V Player Entity

Returns

any

Defined in

server/systems/inventory/weapons.ts:106

Created by Stuyk | Est. 2020