Temp fix consumables not being usable randomly

I believe, the imported consumables from other scripts were fighting with each other in the `createUsableItem` event

In theory, when syncing them (at least at the moment) the restaurant would try to make them usable, and also this script would try. Possibly cancelling each other out?

This removes the `createUsableItem` event from the sync add item event
This commit is contained in:
Jim Shield
2025-05-22 14:23:12 +01:00
parent c2843eaee2
commit 12642b7e7b

View File

@@ -69,7 +69,7 @@ end
RegisterNetEvent(getScript()..':server:syncAddItem', function(itemName, data)
if not Consumables[itemName] then
Consumables[itemName] = data
createUseableItem(itemName, function(source, item) TriggerClientEvent(getScript()..':Consume', source, itemName) end)
--createUseableItem(itemName, function(source, item) TriggerClientEvent(getScript()..':Consume', source, itemName) end)
debugPrint("^5Debug^7: "..GetInvokingResource().." ^2is sending new ^3Item^7: '"..itemName.."'")
if not syncScheduled then
syncScheduled = true