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

just comment those lines https://github.com/TanguyOrtegat/esx_jb_advanced_truck_inventory/blob/master/server/main.lua#L30

1 Like

Alright guys, I need help modifying the resource to bypass quantity select menu if the item is a weapon and just force the player to deposit all of the ammo. This is to stop the split weapon dupe exploit that still exists in the resource. Here’s the trunk deposit portion starting where it adds the weapons to the elem table to be used by the menus as well as the menu function itself: https://www.hastebin.com/ebeluqitag.php

Can someone help me figure out how to get weapons to no ask quantity and just either deposit all ammo or fail due to weight restriction?

The solution you need is right here. Have a look at the “getItemyWeight(item)” function. From there should be straightforward. I implemented this into my own trunk script which allows the player to deposit/withdraw weapons with ammo.

esx_truck by Pandos. (JSON)

1 Like

Hello man ! :slight_smile:
I have a problem with your ressource :confused:
You have an idea ?

I’m having the exact same problem, I’ve been trying for ages to find a resolution.

@Jager_Bom
This has been a nice basis to start with and tweak, thanks!

narkbox-menu_2019-05-01_a1

Mostly have my front end design done, but need to finish polishing up the back end code.

If anyone is curious, I’m using a custom edit of:

For me this fixed Enter spam dupe glitch:
client\main.lua

line 329

  				TriggerServerEvent('esx_truck_inventory:addInventoryItem', GetVehicleClass(closecar), GetDisplayNameFromVehicleModel(GetEntityModel(closecar)), GetVehicleNumberPlateText(vehFront), data3.current.value, quantity, data3.current.name, data3.current.type, ownedV)
                ESX.ShowNotification('Trunk capacity : ~g~'.. Kgweight .. ' Kg / '..MaxVh..' Kg')
				Citizen.Wait(50) 

Modified Citizen.Wait from (500), to (50), takes you faster back to the menu.

Hope this helps others!

no problem, ice ui :slight_smile:

1 Like

Hi all do any one know how to add jerry can to trunk so i can carry it around in car

Do I need to do anything to save items on restart? Someone said their items didnt save in their trunk on restart

Help !! don’t work anymore " - "

My vehicle inventory don’t open anymore when i click " - "

Mines still working fella it dont all ways open on first try you got to move about keep press key then it works ok its not as good as esx_vehicle_inventory but esx_vehicle_inventory you cant put weapons and fuel can in so theres pros and cons with both sadly

Nono, i click the - but don’t work D:

give me few mins i will upload mine you can have

its in english is that ok

Hey,

thank you for your nice script!
Is there a way to make trailers usable as trunks?

That would be a nice feature!

And my second question is: Is it possible to change certain vehicles to other vehicle groups like “industrial” to “commerical” or so?

Thank you for any help! :slight_smile:

HELP

if i put an item into my car, and reopen the “trunk” with “-” the only option i have is to deposit more items. my question is, how to i withdraw items from my car???

You can still duplicate stuff with it, not worth!

Not worth what, the zero dollars you paid for it?

Not worth adding it on your server since people can duplicate items and money, what’s the purpose of it if it’s bugged asf and it ruins the whole economy of a server? Again, not worth adding on a server with such big issue’s.