But that’s why I can’t upload that code to here XD
It’s not mine, so you better do what you said
I made sure all the old esx_inventoryhud things would me compatible.
Hey! I deposited items into trunk and glovebox of a car and then I took them out and whenevery I acces the glovebox or trunk of that car I get these errors.
I checked the database and seems that the plate of that car is still in there even if it’s empty. It should delete that data after removing items from cars. Or am I wrong?
When ever you access the trunk or glovebox the inventory is trying to create a new entry of that can into the database even if it’s empty. Or I dunno. Maybe you get it. Since I am noob and can’t fix this myself, maybe you can do it
Probably, but that has nothing to do with the inventory. Can’t help you on that
Yeah I just saw that the problem is from trunk and glovebox not the inventory. You are right. But idk wtf happened but now the errors don’t happen anymore.
Is there any way to make it work with [Release] Weapons On Back ?
Seems that the script gets the weapons from the weapon wheel not the inventory.
The script, doesn’t store the weapons… Only stores the weapons as items, so you will need to adapt that!
Yeah, thats a bit over my head. I really don’t know how to do that. If someone would be kind enough to help me that would be nice. The thing is that it’s not really realistic when you take out an AK out of you a$$.
i think you need to check if the player has the item “X” in his inventory.
yeah but how do you get weapon hashkey from an item?
Hello, I already updated the script for the version with the images of the items corrected, but even so it still doesn’t appear any image of any item in the inventory, the slots are all transparent.
Can anyone help me add the notification in ESX?
TriggerClientEvent('conde-inventoryhud:notification', (playerid), (item name), (item label), (count) , (if you add the item then set thist to false, if you remove set this to true))
found the function but seems that I’m too noob and can’t figure it out.
Here the code.
self.addInventoryItem = function(name, count)
local item = self.getInventoryItem(name)
if item then
count = ESX.Math.Round(count)
item.count = item.count + count
self.weight = self.weight + (item.weight * count)
TriggerEvent('esx:onAddInventoryItem', self.source, item.name, item.count)
self.triggerEvent('esx:addInventoryItem', item.name, item.count)
end
end
self.removeInventoryItem = function(name, count)
local item = self.getInventoryItem(name)
if item then
count = ESX.Math.Round(count)
local newCount = item.count - count
if newCount >= 0 then
item.count = newCount
self.weight = self.weight - (item.weight * count)
TriggerEvent('esx:onRemoveInventoryItem', self.source, item.name, item.count)
self.triggerEvent('esx:removeInventoryItem', item.name, item.count)
end
end
end
self.addMoney = function(money)
money = ESX.Math.Round(money)
self.addAccountMoney('money', money)
end
self.removeMoney = function(money)
money = ESX.Math.Round(money)
self.removeAccountMoney('money', money)
end
Yeah. Can’t open weapon shop either.
i did like this in the addinventory
TriggerClientEvent(‘conde-inventoryhud:notification’, self.source, item.name, item.name, item.count , false)
and in the remove
TriggerClientEvent(‘conde-inventoryhud:notification’, self.source, item.name, item.name, item.count , true)
the only thing i did not find is the item.label
THANK YOU. Keep up the great work!
I only looked at the code for 2 seconds but it could be that it’s not opening because you don’t have weapon license. I’m not 100% sure if that’s the reason but I did see something bout license when I glanced over it quickly
SCRIPT ERROR: @conde-b1g_inventory/server/main.lua:95: attempt to call a nil value (field ‘getWeight’)
Keep getting this, running es_extended 1.1.0
any help would be amazing
i think this version work with the weight system, and 1.1 works with limit system right?.
i have the newest es extended and it doesnt work with weight? any way to convert it pls?
i also tried the precious verision that should work but it fucked it all. pls tell me how to fix. THIS WAS NOT A DRAG AND DROP