mirror of
https://github.com/jimathy/jim-consumables.git
synced 2026-08-17 06:26:03 +01:00
Add support for jim_bridge setStress function
Allows multiframework stress events
This commit is contained in:
@@ -325,7 +325,7 @@ RegisterNetEvent(getScript()..':Consume', function(itemName)
|
|||||||
|
|
||||||
if stress and stress ~= 0 then
|
if stress and stress ~= 0 then
|
||||||
debugPrint("^5Debug^7: ^3Consume^7: ^2Relieving ^6"..stress.." ^2stress^7.")
|
debugPrint("^5Debug^7: ^3Consume^7: ^2Relieving ^6"..stress.." ^2stress^7.")
|
||||||
TriggerServerEvent('hud:server:RelieveStress', stress)
|
needTypes.stress = stress
|
||||||
end
|
end
|
||||||
if heal and heal ~= 0 then
|
if heal and heal ~= 0 then
|
||||||
debugPrint("^5Debug^7: ^3Consume^7: ^2Healing player by^7: ^6"..heal)
|
debugPrint("^5Debug^7: ^3Consume^7: ^2Healing player by^7: ^6"..heal)
|
||||||
|
|||||||
@@ -142,12 +142,17 @@ RegisterNetEvent(getScript()..":server:finishConsume", function(needTypes)
|
|||||||
|
|
||||||
-- Needs
|
-- Needs
|
||||||
if needTypes.thirst then
|
if needTypes.thirst then
|
||||||
|
debugPrint("^5Debug^7: ^2Thrist^7: [^6"..(needTypes.thirst or 0).."^7]")
|
||||||
setThirst(src, needTypes.thirst)
|
setThirst(src, needTypes.thirst)
|
||||||
end
|
end
|
||||||
if needTypes.hunger then
|
if needTypes.hunger then
|
||||||
|
debugPrint("^5Debug^7: ^2Hunger^7: [^6"..(needTypes.hunger or 0).."^7]")
|
||||||
setHunger(src, needTypes.hunger)
|
setHunger(src, needTypes.hunger)
|
||||||
end
|
end
|
||||||
debugPrint("^5Debug^7: ^2Hunger^7: [^6"..(needTypes.hunger or 0).."^7] ^2Thrist^7: [^6"..(needTypes.thirst or 0).."^7]" )
|
if needTypes.stress then
|
||||||
|
debugPrint("^5Debug^7: ^2Stress^7: [^6"..(needTypes.stress or 0).."^7]")
|
||||||
|
setStress(src, needTypes.stress)
|
||||||
|
end
|
||||||
isConsuming[src] = nil
|
isConsuming[src] = nil
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user