Backpack item
Item defined in items/sh_backpack.lua
Defines the Backpack storage item, which adds 8 to its carrier's inventory weight limit, is limited to one per
player and drops as a boxed_backpack.
Summary
Methods
Always allows the backpack to be picked up.
Blocks taking the backpack from storage when its owner would be left over their weight limit or the player already carries a backpack.
Drops the backpack as a
boxed_backpack item entity.OnDrop(player, position)shared
Blocks dropping the backpack, with a notification, when the player would be left over their weight limit.
Methods
ITEM:CanPickup(player, quickUse, itemEntity)
shared gamemodes/cwhl2rp/schema/items/sh_backpack.lua:40Always allows the backpack to be picked up.
Parameters
- player
- quickUse
- itemEntity
Blocks taking the backpack from storage when its owner would be left over their weight limit or the player already carries a backpack.
Parameters
- player
- storageTable
Drops the backpack as a boxed_backpack item entity.
Parameters
- player
- position
Returns
- Entity The spawned item entity
Blocks dropping the backpack, with a notification, when the player would be left over their weight limit.
Parameters
- player
- position