dreamworkAPI
Ctrl K
GitHub
libraryDocs / input / weapon

input.weapon

libraryclientsource

The weapon module allows to manipulate the client's weapon.

Functions

input.weapon.lastSelects the previously selected weapon.
input.weapon.nextSelects the next weapon in the inventory.
input.weapon.previousSelects the previous weapon in the inventory.

#input.weapon.last

clientsource
function input.weapon.last()

Selects the previously selected weapon.

Instantly sets the player's past weapons as active.

#input.weapon.next

clientsource
function input.weapon.next()

Selects the next weapon in the inventory.

Weapons will most likely not be selected immediately because often players do not use hud_fastswitch, so they will just have their inventory with the selected weapon displayed in the next slot.

#input.weapon.previous

clientsource
function input.weapon.previous()

Selects the previous weapon in the inventory.

Weapons will most likely not be selected immediately because often players do not use hud_fastswitch, so they will just have their inventory with the selected weapon displayed in the next slot.

Generated from the dreamwork meta branch.