Client Functions
HaveItem
frameworkName:HaveItem(item, count)
- item:
string
(item name) - count:
number
(needed amount) - returns:
boolean
Example
function ESX:HaveItem(item, count)
local HaveItem = Async.Await(function(promise)
ESX.Shared.TriggerServerCallback('Trusted:Nitro:HaveItem', function(haveItem)
promise:resolve(haveItem)
end, item, count)
end)
return HaveItem
end
UseItem
frameworkName:UseItem(item, count)
- item:
string
(item name) - count:
number
(amount)
Example
function ESX:UseItem(item, count)
TriggerServerEvent('Trusted:Nitro:ESX:UseItem', item, count)
end