Small Bag item
Item defined in items/sh_small_bag.lua
Defines the Small Bag storage item, which adds 4 to its carrier's inventory weight limit, is limited to two per
player and drops as a boxed_bag.
Summary
Methods
Always allows the bag to be picked up.
Blocks taking the bag from storage when its owner would be left over their weight limit or the player already carries two small bags.
Drops the bag as a
boxed_bag item entity.OnDrop(player, position)shared
Blocks dropping the bag, 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_small_bag.lua:40Always allows the bag to be picked up.
Parameters
- player
- quickUse
- itemEntity
Blocks taking the bag from storage when its owner would be left over their weight limit or the player already carries two small bags.
Parameters
- player
- storageTable
Drops the bag as a boxed_bag item entity.
Parameters
- player
- position
Returns
- Entity The spawned item entity
Blocks dropping the bag, with a notification, when the player would be left over their weight limit.
Parameters
- player
- position