ed
This commit is contained in:
parent
23e3e52966
commit
68151e44fe
11 changed files with 594 additions and 0 deletions
|
@ -114,6 +114,8 @@ function ConsumeItem(name)
|
|||
if ProcessingEffect and not Config.Effects[effectName].canOverlap then return end
|
||||
ProcessingEffect = true
|
||||
Config.Effects[effectName].process(cfg.effect)
|
||||
-- Event auslösen
|
||||
TriggerEvent("pickle_consumables:effectStarted", effectName, cfg.effect, name)
|
||||
ProcessingEffect = false
|
||||
end)
|
||||
end
|
||||
|
@ -289,3 +291,11 @@ AddEventHandler('onResourceStart', function(resourceName)
|
|||
if (GetCurrentResourceName() ~= resourceName) then return end
|
||||
ValidateItemConfigs()
|
||||
end)
|
||||
|
||||
-- Event-Listener für Alkoholkonsum
|
||||
AddEventHandler("pickle_consumables:effectStarted", function(effectName, effectData, itemName)
|
||||
if effectName == "drunk" then
|
||||
local intensity = effectData.intensity or 1.0
|
||||
TriggerServerEvent('qb-alcoholtest:server:alcoholConsumed', itemName, intensity)
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue