Hello, i’m trying to edit the esx_jb_advanced_truck_inventory resource,
It basicly creates an trunk inventroy in every vehicle, but there is one problem, i can only change the max weight in a trunk for a vehicle class, such ass “Sedans” can only carry 20KG and “Helicopters” can carry 50kg,
so what i want to do is to change instead of using “GetVehicleClass” to somehow get the VehicleModel name so i can change every specific max car weight in the game
Yes, but the thing is, the player is accesing the trunk from outside of the car, Also the value of the trunk needs to be constant, not “When player is near/in”
But i cant get the script to “Read” that this is the total weight. It ends up that i can open the esx_menu_dialog until “Amount” appears, Then it’s stuck
now look in the script where it applies the weight limit of classes. do a firt check if the vehile model is in the list, if it is, then take that value otherwise take value in class list
local vehicleModelClassWeight = GetVehicleClass(frontVeh)
local vehicleModelModelWeight = GetEntityModel(frontVeh)
if Config.vehicleModelModelWeight [vehicleModel] ~= nil then
if totalweight > Config.vehicleModelModelWeight [vehicleModel] then
max = true
else
max = false
end
else
if totalweight > Config.vehicleModelClassWeight [typeVeh] then
max = true
else
max = false
end
end
local MaxVhModel =tonumber(Config.VehicleModelModelWeight[vehicleModel])/1000)
local MaxVhClass = tonumber(Config.VehicleModelClassWeight[typeVeh])/1000)
This is confusing me alot lol So basicly i need to edit everything then? I mean, the scirpt is probably using something called “MaxVh” some where in the code, and if i change it to MaxVhModel, Doesent i have to change it on every line it uses it?