改为ox进行调用
RegisterNetEvent('consumables:client:Eat')
AddEventHandler('consumables:client:Eat', function()
local val = math.random(Config.RemoveStress["eat"].min, Config.RemoveStress["eat"].max)
TriggerServerEvent('hud:server:RelieveStress', val)
end)
RegisterNetEvent("esx_basicneeds:onUse")
AddEventHandler("esx_basicneeds:onUse", function(type)
if type == 'food' then
local val = math.random(Config.RemoveStress["eat"].min, Config.RemoveStress["eat"].max)
TriggerServerEvent('hud:server:RelieveStress', val)
end
end)
页:
[1]