diff --git a/server/main.lua b/server/main.lua index 2bb9408..461c66f 100644 --- a/server/main.lua +++ b/server/main.lua @@ -452,13 +452,9 @@ exports("GetUsableItem", GetUsableItem) ---@param ... any Arguments for the callback, this will be sent to the callback and can be used to get certain values local function UseItem(itemName, ...) local itemData = GetUsableItem(itemName) - if type(itemData) ~= "table" then - return false + if type(itemData) == 'table' and itemData.func then + itemData.func(...) end - if not itemData.func then - return false - end - itemData.func(...) end exports("UseItem", UseItem)