[ADDON][ESX] Inventory HUD - Vehicle trunk 2.4.0

If you have the eden_jb_garage and didnt work for you here i have a fix for your

esx_inventoryhud_trunk/server/trunk.lua
Line 53

function getOwnedVehicule(plate)
  local found = false
  if listPlate then
    for k, v in pairs(listPlate) do
      if string.find(plate, v) ~= nil then
        found = true
        break
      end
    end
  end
  if not found then
    local result = 
    MySQL.Sync.fetchAll(
      "SELECT * FROM `owned_vehicles` WHERE `plate` = @plate AND `vehicle` = @vehicle",
      {
        ["@plate"] = plateF,
        ["@vehicle"] = vehicle
      } 
    )
    while result == nil do
      Wait(5)
    end
    if result ~= nil and #result > 0 then
      for _, v in pairs(result) do
        local vehicle = json.decode(v.vehicle)
        if plateF == plate then
          found = true
          break
        end
      end
    end
  end
  return found
end

PantsuRP
Discord: https://discord.gg/eqZYsU6

1 Like

Please help I can open the inventory but nothing I do will close the inventory

Just found out I installed esx_trunk instead of this one. HOW STUPID. Although that one looks fine I think this is much cooler! Thanks a lot

Does anyone to get that citizen card?

I got everything to work but my addon cars are in a category of their brand names. By doing this the addon cars arent in a category that this script uses. Can i just add my own category’s in the config file to change the load value?

Config.VehicleLimit = {
[0] = 30000, --Compact
[1] = 40000, --Sedan
[2] = 70000, --SUV
[3] = 25000, --Coupes
[4] = 30000, --Muscle
[5] = 10000, --Sports Classics
[6] = 5000, --Sports
[7] = 5000, --Super
[8] = 5000, --Motorcycles
[9] = 180000, --Off-road
[10] = 300000, --Industrial
[11] = 70000, --Utility
[12] = 100000, --Vans
[13] = 0, --Cycles
[14] = 5000, --Boats
[15] = 20000, --Helicopters
[16] = 0, --Planes
[17] = 40000, --Service
[18] = 40000, --Emergency
[19] = 0, --Military
[20] = 300000, --Commercial
[21] = 0 --Trains
[22] = 20000, – Mercedes

Like this? or do i need to change something else?

How can I solve it? Number of births that help

How would i add a new category to be able to change the weight?

I’ve just downloaded the most recent version of Inventory Hud and now none of my vehicle trunks open. They flicker open and closed again.

I’ve redownloaded, updated both and reconfigured. No errors, just doesn’t open the trunk.

Any one else got this?

SetVehicleDoorOpen/SetVehicleDoorShut is not working really :smile: any fix ?

please help me
also for me


stack traceback:
@esx_inventoryhud_trunk/server/trunk.lua:71: in function ‘getOwnedVehicu
le’
@esx_inventoryhud_trunk/server/trunk.lua:83: in function ‘MakeDataStore’

    @esx_inventoryhud_trunk/server/trunk.lua:98: in function 'GetSharedDataS

tore’
@esx_inventoryhud_trunk/server/trunk.lua:106: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:219: in function <citizen:/scriptin
g/lua/scheduler.lua:218>
Error resuming coroutine: @esx_inventoryhud_trunk/server/trunk.lua:71: attempt t
o index a nil value (local ‘vehicle’)

when i’m push Y , trunk open but menu not shown and i get error
do i remove some lines in “esx_extended” ?

do i change my server.cfg ?

start RealisticVehicleFailure
start LegacyFuel
start esx_fwd_ui

-------------------------------

start pNotify
start esx_inventoryhud
start esx_inventoryhud_trunk

--------------------------------------------- ERROR
stack traceback:
@esx_inventoryhud_trunk/server/trunk.lua:71: in function ‘getOwnedVehicu
le’
@esx_inventoryhud_trunk/server/trunk.lua:83: in function ‘MakeDataStore’

    @esx_inventoryhud_trunk/server/trunk.lua:98: in function 'GetSharedDataS

tore’
@esx_inventoryhud_trunk/server/trunk.lua:106: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:219: in function <citizen:/scriptin
g/lua/scheduler.lua:218>
Error resuming coroutine: @esx_inventoryhud_trunk/server/trunk.lua:71: attempt t
o index a nil value (local ‘vehicle’)

i dont have the scripts on my server but i can try to get them on my server again and try things

What script do you use for F2 menu and Y menu ?

:smiley: dont know i use the inventoryhud and the trunk hud :smiley:

but i thing it is the f2

ok cant help you there :smiley: i deleted it because of this

When I press - the trunk open but the inventory dont show up,Can anybody help me pls.

show me ur files


any solution? When I open the trunk of the car, this error appears