#[FREE] [QBCore & ESX] Inventory Weight System!

1 messages · Page 1 of 1 (latest)

maiden nacelle
#

0, not 2

#

Anything above 0 will cause issues with things that needs to be looped every frame

#

Also, instead of converting a string to a number to convert percentages, just do percentage / 100, this divides it by 100 to get the decimal number of the percentage

#

Btw, you can add use_experimental_fxv2_oal 'yes' to your fxmanifest.lua to speed up native invocation, so essentially optimize natives in your resource

#

The only downside is it disables vector unpacking but you don't use that

candid viper
#

Thanks for the advise buddy! Appriciate it! ❤️

maiden nacelle
#

No problem

low nest
# maiden nacelle 0, not 2

No reason to be 0 buddy, Check out what it effects when having 0 and 2 wait.
Literally nothing so your losing out on performance for no reason.

Thanks for the suggestion with experimental fxv2 but as it says in the title its experimental.. What possible issues could this cause?
I will edit the code now for the percentage suggestion.

maiden nacelle
# low nest No reason to be 0 buddy, Check out what it effects when having 0 and 2 wait. Lit...

Check out what it effects when having 0 and 2 wait
Literally no difference besides whenever someone with a bad or incredibly good (forgot which one it was) pc comes along, they will experience stutters from that native as it needs to be run every frame, not every frame that occurs every 2 milliseconds, which means it'll skip every occasional frame as a frame takes about 16 milliseconds on average on the average pc and that wait stacks up on frame skips the longer it runs

your losing out on performance for no reason.
There is literally no performance loss for waiting 2 milliseconds less

experimental fxv2 but as it says in the title its experimental
We use it in all of qbox and I added it to qb when I was a dev there, no issues since 1.5 years ago

#

The experimental title was only added because an issue occurred and to keep people away from what could be something that breaks occasionally, but it's not broken

#

And it hasn't been for some time now

#

It won't ruin your resource if it breaks either, if it breaks it'll only disable itself meaning your resource will only be a little slower

low nest
# maiden nacelle > Check out what it effects when having 0 and 2 wait Literally no difference bes...

In the past I have used multiple different low values and not ran into any issues (server with +40 players) and noticed that in most cases using 0 as a wait will cause more issues in terms of fps loss.. Regardless of if you have a s*** pc or a god tier pc I don't think 2 frames are going to cause any issues.
Granted most of these issues was back when I used esx.. way before legacy was released but still maybe I'm using ancient tech đź‘€

Thanks for the explanation I will also add experimental fxv2 now I know it wont completely render the script useless if it disables itself!

maiden nacelle
#

noticed that in most cases using 0 as a wait will cause more issues in terms of fps loss
2ms can't make that difference unless you're doing things you shouldn't be doing every frame

#

And also, where you visibly notice 2ms is when you draw text on your screen

#

But still, you don't want to be skipping frames

#

That's 20, but still

low nest
#

Ive actually been up to wait(7) multiple times while drawing text on screen and with all the players I have uncounted no one of them have had issues with it?

you cant say calling something every 2 frames over 0 frames wont impact performance because that's just facts
The loops getting called to go through stuff such as the entire inventory for esx users which if they have 200+ items its going to cause more issues for performance.
But I appriciate your suggestion

maiden nacelle
#

The loops getting called to go through stuff such as the entire inventory for esx users which if they have 200+ items its going to cause more issues for performance.
This is exactly what you shouldn't do every frame

low nest
#

yes hence why it don't do that.. Idk why I just said that actually lmao

maiden nacelle
#

And you can go upto Wait(7) on the average machine yeah, but outside of that people get affected by less and less the more you go one direction

low nest
#

I got lost in my own train of thought there

#

but still wait(0) and wait(2) have 0 effects for me and every player I have ran into

maiden nacelle
maiden nacelle
#

Internally it requires it to be 0, otherwise it doesn't function as it's supposed to

#

You may not visibly notice as it's internal

low nest
# maiden nacelle In this case, you're looping a native that needs to be run every frame, hence wh...

It wont have any affect changing it to 0 for this script anyway as its already so lightweight my worry was the more shit you add to the pile in terms of resources like this the more performance issues people will have later on.
Yes its only 2 frames difference but that could make all the difference out there for someone on a potato machine.
And since it has 0 issues so far if I run into issues with it in the future I'll be the first thing I look at thanks to this conversation!

maiden nacelle
#

I'm trying to teach you that it doesn't have performance loss in this case, as what you're doing in the loop is almost nothing

#

You need to understand what the difference is between expensive natives and cheap natives (expensive and cheap meaning the amount of performance it takes)

#

A computer can handle more than you think in this case

#

Even a potato

low nest
#

I've been doing this for 4 years and had no issues buddy I appreciate it I do but I'll always look out for the little guys

maiden nacelle
#

I've been doing this for 5 years and have experimented with all kinds of pcs, high end low end, mid end

#

I've learned it when I was 2 years in and have studied it ever since

#

A computer can handle a ton, but when a requirement is there, you adhere to it to avoid issues even if you don't notice the issues visibly

#

As stacking up issues can cause visible issues

#

In this case the stacking issue is the frames it skips

#

When it requires to not skip any frames for SetPedMoveRateOverride

low nest
#

okay how about we meet half way and I set it to wait(1)?

maiden nacelle
#

I told you it requires it to run every frame, that's not every frame as it waits 1 millisecond

#

All Wait(0) does is make sure the loop acknowledges the frames and runs within them

#

Without a Wait it runs on your systems frames which move faster than the game and will make you crash

low nest
#

yes I have had my fair share of forgetting waits in loops in the past.. I do enjoy a good crash sometimes.

What if I set it to 0.5?

maiden nacelle
#

I don't think you can do that and that still makes it wait if it works

#

It has to be 0

#

Otherwise it's not running every frame occasionally

#

Wait requires an integer aka a round number so you can't put in a float according to the docs

low nest
slender vessel
#

BuddyB

maiden nacelle
low nest
maiden nacelle
#

I am too serious about teaching people sometimes

tawdry python
civic timber
#

Closing post, heated discussion

#

Capped at 90fps, with 10ms wait. Slight and barely flickers. Alt tabbed capped at 50fps. No stutters.

#

Even slight flickering at 4 and 3

#

Save too say and this has been debunked many times before, adding a wait of 2ms doesn't do anything really @low nest pepeiheartu

low nest
radiant glacier
low nest
radiant glacier
radiant glacier
#

let me know if you find them tho

low nest
#

ah makes sense why your toxic then dont it, Stop talking you muppet and go to bed

radiant glacier
#

bit homophobic dont you think?

low nest
#

Your toxic because your being toxic.

radiant glacier
#

interesting

low nest
#

your gay because your gay

radiant glacier
#

you're still clueless

#

and why would i go to bed when its 10am you fucking minge

low nest
#

You're*

#

And*

radiant glacier
low nest
#

u wanted a argument little man

radiant glacier
#

I own gay now?

#

shame you dont have 4 years experience in proper grammar

low nest
#

shame you don't have anything better do to with your time.
Adios gay boy

coarse lintel
radiant glacier
coarse lintel
#

Should of spend the 4 years of developing to evolve as a human being shrug

radiant glacier
#

Watch out, if you’re not careful he’ll call you toxic and tell you to go home to your wife and kid and abuse them

low nest
#

lmao hes gay I better take his side even though hes running in here being toxic to people whos trying to help out the community!
Wow nice one buddy get a grip 🤣

#

Full of backwards monkeys in here I can see, Cya 🤣

coarse lintel
#

Bro I took no side just didn't want to see someone clearly be homophobic? and I am the bad one?

Jeez this guy really wasted 4 years of developing

radiant glacier
#

Idek why he got upset

#

I was just shit talking as I usually do about FiveM developers

civic timber
#

Stop being toxic