SlashCo Wiki

SlashCo.UseItem

  SlashCo.UseItem( Player ply )

Description

Uses the survivor's currently held item (the secondary slot takes priority over the primary one) by calling its ITEM.OnUse callback.
The item is removed afterwards unless ITEM.OnUse returns a truthy value, in which case an "item unusable" sound plays instead.
Does nothing in the lobby, for non-survivors, or while the player is frozen.

Arguments

1Player ply

The player to use the item for.