We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9afdc87 + 8a9ec6c commit 377be96Copy full SHA for 377be96
server/functions.lua
@@ -162,9 +162,9 @@ exports('SetItemData', SetItemData)
162
163
function UseItem(itemName, ...)
164
local itemData = QBCore.Functions.CanUseItem(itemName)
165
- local callback = type(itemData) == 'table' and (rawget(itemData, '__cfx_functionReference') and itemData or itemData.cb or itemData.callback) or type(itemData) == 'function' and itemData
166
- if not callback then return end
167
- callback(...)
+ if type(itemData) == "table" and itemData.func then
+ itemData.func(...)
+ end
168
end
169
170
exports('UseItem', UseItem)
0 commit comments