#How to see when a player uses an item.
1 messages · Page 1 of 1 (latest)
Thanks, but it isnt what im looking for. I want it to use a function when the item is used.
Example:
AddEventHandler("usedItem", function(itemName)
if itemName == 'clothingbag' then
doStuff()
end
end)
It's ez btw just usable item and use the function or what you need on it
What?
I think what they're trying to say is the usable item will have an event/function defined already. You can execute your logic in there.
How can i give the item a defined function/event then?
You'll find all these answers in the docs. I recommend reading them.
https://docs.qbcore.org/qbcore-documentation/qbcore-resources/qb-inventory#useitem
Thanks dude, ill look into that.