OnHandItemChanged||doc136889

September 20, 2022

Format

local event = Entity:GetEvent("OnHandItemChanged")

Description

Triggered event when entity handheld item changes.

Callback function parameters

Type Name Introduction
Entity entity Entity that switched the item
Item item New Handheld Item object

Code Example

local event = Event:GetEvent("OnHandItemChanged")
event:Bind(function(entity, item)
    print(entity.. " change hand item " .. item)
end)