mirror of
https://github.com/jimathy/jim-consumables.git
synced 2026-12-03 20:24:47 +00:00
Trying to get better overriding of item control
This commit is contained in:
1 parent
59540d95b6
commit
1036f1dc21
1 file changed
+7
-11
+7
-11
@@ -1,13 +1,9 @@
|
|||||||
local QBCore = exports['qb-core']:GetCoreObject()
|
local QBCore = exports['qb-core']:GetCoreObject()
|
||||||
|
|
||||||
--Consumables
|
CreateThread(function()
|
||||||
for k in pairs(Config.Consumables) do
|
for k, v in pairs(Config.Consumables) do
|
||||||
QBCore.Functions.CreateUseableItem(k, function(source, item)
|
QBCore.Functions.CreateUseableItem(k, function(source, item) TriggerClientEvent('jim-consumables:Consume', source, item.name) end)
|
||||||
TriggerClientEvent('jim-consumables:Consume', source, item.name)
|
if not QBCore.Shared.Items[k] then print("Item check - '"..k.."' not found in the shared lua") end
|
||||||
end)
|
if not Config.Emotes[v.emote] then print("Emote check - '"..k.."' requested emote '"..v.emote.."' - not found in config.lua") end
|
||||||
end
|
end
|
||||||
for k, v in pairs(Config.Consumables) do
|
end)
|
||||||
QBCore.Functions.CreateUseableItem(k, function(source, item) TriggerClientEvent('jim-consumables:Consume', source, item.name) end)
|
|
||||||
if not QBCore.Shared.Items[k] then print("Item check - '"..k.."' not found in the shared lua") end
|
|
||||||
if not Config.Emotes[v.emote] then print("Emote check - '"..k.."' requested emote '"..v.emote.."' - not found in config.lua") end
|
|
||||||
end
|
|
||||||
Reference in new issue
Block a user