#tgiann-lumihud x qbox Hunger + thirst + stress update

1 messages · Page 1 of 1 (latest)

jovial rose
#

fxmanifest.lua
Add this into shared_scripts

    '@ox_lib/init.lua', -- qbx playerStatus.lua
    '@qbx_core/modules/lib.lua', -- qbx playerStatus.lua

Add this into client_scripts

    '@qbx_core/modules/playerdata.lua', -- qbx playerStatus.lua

client/playerStatus.lua

Comment out the existing code for the elseif statement at the bottom of the file, then add this in.

elseif config.framework == "qb" then
    AddStateBagChangeHandler('hunger', ('player:%s'):format(cache.serverId), function(_, _, value)
        hunger = value
    end)
    AddStateBagChangeHandler('thirst', ('player:%s'):format(cache.serverId), function(_, _, value)
        thirst = value
    end)
    AddStateBagChangeHandler('stress', ('player:%s'):format(cache.serverId), function(_, _, value)
        stress = value
    end)
end

This works fine for me, goodluck.

#

tgiann-lumihud x qbox Hunger + thirst + stress update