[RELEASE] Advanced truck inventory for ESX (black money, weapons, items)

I just found, for guys who do not know and only put in es_extended\client\functions.lua line 177

ESX.GetItemLabel = function(name)
    if ESX.Items[name] ~= nil then
      return ESX.Items[name].label
    end
end

why people can duplicate items if the remove at the same time items from the inventory?

they can duplicate because there is a bug somewhere

can i fix this bug

Sure you can. I’d start by perhaps wrapping the object spawn inside an IF check on the ID to ensure that it hadn’t already been operated on in that loop.

how can i do this?

it’s possible to post ur modifications? thanks

Ya, there is still a bug I cant figure out that will bug and you cant open the trunk after a certain amount of time.

Hey dude, can you share it?

Here is my Modification.

esx_ati.zip (7.8 KB)

1 Like

I get this error when adding the sql:

Fehler

SQL-Befehl:

``


ALTER TABLE `truck_inventory`
 ADD PRIMARY KEY (`id`);

MySQL meldet: Dokumentation

#1068 - Multiple primary key defined

Very nice script, although you can double the inserted items. Can you do something about it?
in line 348 client side

Citizen.Wait(500)

I think that it is possible to click accept several times, which doubles the item

1 Like

Read what its telling you? You have got more then one primary key

Whenever I start the server, the entire truck table in database is cleared. Does anyone know the reason?

How do i acces the menu?

it does not work for me, it deletes all the objects from the car in the database

Anyone got a fix for the duplicated items bug?

1 Like

That works, i probably should have made that change back. I actually removed it because i have a dedicated script to open and close the trunk so it felt more realistic.

nobody should be using this script because it has alot of duplication bug… why is it still up :open_mouth:

1 Like

When this happens, it’s deleting stuff from the DB so the players loose all the stuff in the trucnk inventory