Declaration
func AddAttachments(target entity<Player>, slot SwitchEquipSlot, item ItemIDType, out var isSuccess bool, out var attachment entity<Entity>)
go
Parameters
Input
| Name | Type | Description |
|---|---|---|
| Target | Player | Target Player |
| Slot | SwitchWeaponEquipSlot | Equipment slot |
| Item | ItemGoodsIDType | Accessory |
Out
| Name | Type | Description |
|---|---|---|
| Is Success | Bool | Whether the accessory has been added successfully |
| True: The accessory has been equipped to the weapon in the corresponding slot | ||
| False: The accessory has failed to be added and will not appear in the player’s backpack | ||
| Attachment | Entity | Added accessories, null if failed |