SlashCo Wiki

SlashCo.ChangeSurvivorItem

  SlashCo.ChangeSurvivorItem( Player ply, string slot, string id, boolean noSound )

Description

Equips the given item into the specified slot (forced to the secondary slot if the item is marked as secondary), calling its ITEM.OnPickUp callback and the previous item's ITEM.OnSwitchFrom callback.
Plays an equip sound unless noSound is true. Passing "none" as id clears the slot instead.

Arguments

1Player ply

The player to equip the item on.

2string slot

"item" or "item2". Defaults to "item".

3string id

Name of the item to equip, or "none" to clear the slot.

4boolean noSound

If true, no equip sound is played.