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

Would be nice with that fix with out doubt :slight_smile:

I’ll try to submit the pull request today.

Edit: Submitted PR for backspace issue

1 Like

Help error ?

Error running call reference function for resource esx_truck: citizen:/scripting/lua/scheduler.lua:351: server/main.lua:73: attempt to call a nil value (field ‘GetItemLabel’)
stack traceback:
server/main.lua:73: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:337: in function citizen:/scripting/lua/scheduler.lua:336
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:336: in function citizen:/scripting/lua/scheduler.lua:335
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:351: in function citizen:/scripting/lua/scheduler.lua:322
[C]: in function ‘coroutine.resume’
citizen:/scripting/lua/scheduler.lua:34: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function citizen:/scripting/lua/scheduler.lua:138
[C]: in function ‘coroutine.resume’
citizen:/scripting/lua/scheduler.lua:34: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:335: in function citizen:/scripting/lua/scheduler.lua:322
Error running system event handling function for resource esx_truck: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/MessagePack.lua:830: in method ‘underflow’
citizen:/scripting/lua/MessagePack.lua:465: in field ‘any’
citizen:/scripting/lua/MessagePack.lua:860: in field ‘unpack’
citizen:/scripting/lua/scheduler.lua:563: in local ‘cb’
server/truck.lua:95: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:175: in function citizen:/scripting/lua/scheduler.lua:174
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function citizen:/scripting/lua/scheduler.lua:138
[C]: in function ‘coroutine.resume’
citizen:/scripting/lua/scheduler.lua:34: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:335: in function citizen:/scripting/lua/scheduler.lua:322
hitch warning: frame time of 218 milliseconds

FWIW, the pull request was merged to fix the backspace issue. Update the script from GitHub to fix that issue.

for the script from pando you need to add a bit of code in es_extended, i ll post code when i have time
and yes updated version on my github should work

@Jager_Bom where you take this “Config.VehicleLimit”

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

If I insert a new cathegory…like VIPCars is there an option to give them also a Limit?

no these are gta5 vehicle classes but you could add vip cars in the script itself

thx for that fast answert, by the way “@jager_bom” you name say me something…was it not your script where you handcuffs was as usable item?

Some Error confusing me:

– Default weight for an item:
– weight == 0 : The item do not affect character inventory weight
– weight > 0 : The item cost place on inventory
– weight < 0 : The item add place on inventory. Smart people will love it.
Config.DefaultWeight = 0 – Standard

If I use “=” or “==” or “>” or “<” after i insert my items:
https://hastebin.com/onicicociw.vbs

I got this ERROR:
Error running call reference function for resource es_extended: citizen:/scripting/lua/scheduler.lua:351: server/main.lua:78: attempt to index a nil value (field ‘?’)
stack traceback:
server/main.lua:78: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:337: in function citizen:/scripting/lua/scheduler.lua:336
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:336: in function citizen:/scripting/lua/scheduler.lua:335
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:351: in function citizen:/scripting/lua/scheduler.lua:322
[ERROR] [MySQL] Check the error above, an error happens when executing the callback from the query : “SELECT * FROM user_inventory WHERE identifier = @identifier {@identifier=steam:110000101cb588d}”

and all spawn a Tony Hawk…

when you get that error ?

One more…wrote a little bit confused xD

I use this config: https://hastebin.com/heqeliriyi.lua

If I use “>” or “<” I got this Error

Error parsing script config/config.lua in resource esx_advanced_truck_inventory: config/config.lua:11: syntax error near ‘>’
Failed to load script config/config.lua.
Error loading script server/main.lua in resource esx_advanced_truck_inventory: server/main.lua:2: attempt to index a nil value (global ‘Config’)
stack traceback:
server/main.lua:2: in main chunk
Failed to load script server/main.lua.
Started resource esx_advanced_truck_inventory

If I use “==” Server crashes

If i use “=” it seams not working @Jager_Bom

defaultweight of an item must be a number so you need to defaultweight = 1000 for example

BÄM…found the problem…it sit in front of this monitor xD Thx

1 Like

what about the bug ,when you deposit an items and click many times ,you get multiple items inside the inventory.
eg. i got 10 waters on me ,i open trunk and choose water from my inventory ,write 10 in dialogue and press the ok button 3-4 times quickly,then i got 30 waters or 40 on my trunk.How i can get passed this?

There is also an exploit if using Eden garage. IF you make an insurance claim with eden garage, you can spawn multiple personal vehicles and person A can deposit multiple items and person B can retrieve them.

does anyone know how to fix the trunk opening? It like opens up less then halfway and shuts real quick.

1 Like

@Presty1 Same problem here…

How to drop items? I click L and i only see inscription “MENU”

so the duplicate thing and the trunk occupied issue is caused by the check of inventory is open.if someone blocks the open animation of trunk when the hotkey is pressed then it can be accessed by another person too.If the trunk animation is all done and the trunk is open graphically then you get the message trunk is open and the function is working as intended. We got to change the check of the trunk open or closed.

I have tried many times to get a police search feature going with this, has anyone successfully set one up? This would be a amazing addition to my server but without being able to search vehicles it would be pretty tough.