Qbox-project / qbx_core

http://qbox-project.github.io
Other
46 stars 113 forks source link

feat: use statebags for hunger/thirst/stress #395

Closed TonybynMp4 closed 3 months ago

TonybynMp4 commented 4 months ago

Description

Statebags are cool :+1: It keeps compatibility with the old way of setting those values, so we can start using statebags without anything being broken until then!

(please test to make sure i didn't fuck it up)

Checklist

Fraprwnt commented 4 months ago

I tried to test this, there was an error on line 10 about compare nil with number and in the console it was arithemetic on nil value server/loops.lua:6

TonybynMp4 commented 4 months ago

I tried to test this, there was an error on line 10 about compare nil with number and in the console it was arithemetic on nil value server/loops.lua:6

Try again now, errors makes sense if the values aren't set to begin with 😆

Fraprwnt commented 4 months ago

I tried to test this, there was an error on line 10 about compare nil with number and in the console it was arithemetic on nil value server/loops.lua:6

Try again now, errors makes sense if the values aren't set to begin with 😆

Yes, this works well, there are no errors, I found several problems, when I eat it does increase in the bar, but when I continue eating it gets stuck and doesn't add any more, and when I drink it's the same, what's there actually decreases.

TonybynMp4 commented 4 months ago

when I eat it does increase in the bar, but when I continue eating it gets stuck and doesn't add any more, and when I drink it's the same, what's there actually decreases.

That's weird, i don't really see why that would happen, tbh 🤔

mafewtm commented 4 months ago

I'm experiencing the same issue too. When I use this with your hud pr, the first time I eat it updates but after that, it doesnt update anymore from what I can tell.

TonybynMp4 commented 4 months ago

Yes, this works well, there are no errors, I found several problems, when I eat it does increase in the bar, but when I continue eating it gets stuck and doesn't add any more, and when I drink it's the same, what's there actually decreases.

@Fraprwnt can you please update core smallresources & hud and try again now? :) (you too @MafewTM)

Fraprwnt commented 4 months ago

Yes, this works well, there are no errors, I found several problems, when I eat it does increase in the bar, but when I continue eating it gets stuck and doesn't add any more, and when I drink it's the same, what's there actually decreases.

@Fraprwnt can you please update core smallresources & hud and try again now? :) (you too @MafewTM)

to eat using items from ox_inventory remains the same. It only increases after the first meal. The second and third don't change anything, but to eat using items from the smallresources config, for the first and second meal the same amount of food and drink increases.