Skip to content

five-on-it / packages/sim/src/weapons / weaponHeldAt

Function: weaponHeldAt() ​

weaponHeldAt(sim, eid, slot, seated): number

Defined in: packages/sim/src/weapons.ts:271

The weapon a character holds with slot selected: the weapon of the item in it (the fists for an empty slot or an item that is no weapon); seated, that weapon only when it is the pistol, the one weapon fired from a car, the fists otherwise (which do not fire from a car). The server's rule (heldWeapon) and the client's at once, from the slot it selected.

Parameters ​

sim ​

SimWorld

eid ​

number

slot ​

number

seated ​

boolean

Returns ​

number