JiminyKroket / Invhud

ESX_InventoryHUD rework
11 stars 12 forks source link

weapons with ammo #38

Closed xrtw closed 3 years ago

xrtw commented 3 years ago

cant store into trunk weapons with ammo, because it shows not detected weight or something... looks like its so heavy or something like this.

JiminyKroket commented 3 years ago

Why is this opened as an issue? You literally explained why they don't fit. You have the gun weight too heavy for the amount of ammo the person wants to store. Make guns weigh 1.

On Sat, Jan 30, 2021, 6:49 AM xrtw notifications@github.com wrote:

cant store into trunk weapons with ammo, because it shows not detected weight or something... looks like its so heavy or something like this.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JiminyKroket/Invhud/issues/38, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCMCAEOWM7A64IM27X5HTDS4P533ANCNFSM4W2I6GTQ .

JiminyKroket commented 3 years ago

If you are saying the script is using a default weight for a weapon then add it to the proper table so it doesn't default

On Sat, Jan 30, 2021, 6:56 AM Zach Kwiatkowski gimmethiz@gmail.com wrote:

Why is this opened as an issue? You literally explained why they don't fit. You have the gun weight too heavy for the amount of ammo the person wants to store. Make guns weigh 1.

On Sat, Jan 30, 2021, 6:49 AM xrtw notifications@github.com wrote:

cant store into trunk weapons with ammo, because it shows not detected weight or something... looks like its so heavy or something like this.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JiminyKroket/Invhud/issues/38, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCMCAEOWM7A64IM27X5HTDS4P533ANCNFSM4W2I6GTQ .

xrtw commented 3 years ago

i have written all weights in database also in config of invhud. but if weapon is with ammo, so it doesnt find weight of it and makes it so heavy by script default

xrtw commented 3 years ago

it only happens if weapon has more than 100 ammo

JiminyKroket commented 3 years ago

Ammo adds to weight. Not an issue. Its how the math works

On Sun, Jan 31, 2021, 8:12 AM xrtw notifications@github.com wrote:

it only happens if weapon has more than 100 ammo

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JiminyKroket/Invhud/issues/38#issuecomment-770388505, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCMCAASLA2TXCYXT35FFODS4VQMXANCNFSM4W2I6GTQ .

xrtw commented 3 years ago

how can i make it to weight less?

JiminyKroket commented 3 years ago

Adjust the weight math

On Sun, Jan 31, 2021, 8:35 AM xrtw notifications@github.com wrote:

how can i make it to weight less?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JiminyKroket/Invhud/issues/38#issuecomment-770391826, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCMCAEJJJFWLYW6HDGE4NDS4VTCBANCNFSM4W2I6GTQ .

xrtw commented 3 years ago

hello, made 2 screenshots with ammo. If you have no ammo, you can store a pistol with weight of it - 80. if you have bullets ~100, you cant store it. tried to make larger trunk inventory so i could, but weight was only 81 with 100 bullets.. https://imgur.com/a/uU7UuNo

xrtw commented 3 years ago

go server.lua change from if doRound(total, 2) + doRound(itemWeight, 2) > doRound(totWeight, 2) then to if doRound(total, 2) + doRound(itemWeight*0.01, 2) > doRound(totWeight, 2) then