Add Attachments

Items
Lado del servidor
Disponible en PC y móvil

Add an accessory to the weapon in the specified slot. Accessory that does not match the slot will fail to be added; matching but duplicate accessory will replace the original accessory, and the original accessory will be sent to the player's backpack. If

Declaración

func AddAttachments(target entity<Player>, slot SwitchEquipSlot, item ItemIDType, out var isSuccess bool, out var attachment entity<Entity>)
go

Parámetros

Entrada

Nombre Tipo Descripción
Target Player Target Player
Slot SwitchWeaponEquipSlot Equipment slot
Item ItemGoodsIDType Accessory

Afuera

Nombre Tipo Descripción
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