Closed Mohtrion closed 6 months ago
i would appreciate help as this is something i would love to implement into my server
I forgot to add this in the readme file, thank for notice.
local function OpenTrunk()
local vehicle = QBCore.Functions.GetClosestVehicle()
LoadAnimDict("amb@prop_human_bum_bin@idle_b")
TaskPlayAnim(PlayerPedId(), "amb@prop_human_bum_bin@idle_b", "idle_d", 4.0, 4.0, -1, 50, 0, false, false, false)
if IsBackEngine(GetEntityModel(vehicle)) then
SetVehicleDoorOpen(vehicle, 4, false, false)
else
SetVehicleDoorOpen(vehicle, 5, false, false)
end
end
local function isAllowToOpen(vehicle)
if GetVehicleClass(vehicle) == 18 then
if PlayerData.job.name == 'police' or PlayerData.job.name == 'ambulance' then
return true
end
else
return true
end
end
i appreciate the quick response but unfortunately it still is not working. still writing the same error
[ c-scripting-core] InvokeNative: execution failed: Argument at index 1 was null. [ script:ps-inventory] SCRIPT ERROR: Execution of native 000000002f7a49e6 in script host failed: Argument at index 1 was null.
Im haveing the same issue where my inventory wont open when i press tab
Im useing ps inventory
Ok I looked to see what it could be, but I can't reproduce this error, I don't know how you installed it but I think you forgot something or didn't do something right, because when I install it it just works , this script doesn't work if you only download ps inventory, you have to modify it to make it work with chasasitem. I have an example inventory of ps-inventory and qb-inventory, I also created an mh-inventory because that is the ps-inventory that should work with this script, but it looks like you just dowmload a ps-inventory or uses your old inventory, and then not edit everything that needs to be edited.
maby here is the issue why it's not opening?
cant figure it out
inventory wont open
cant figure it out
inventory wont open
do you have an Config.UseTarget
in your config?
i have no idea this is my first server
where would that be?
in resources\[qb]\qb-inventory/config.lua
i had it as false in server.config i changed it to true let me see if that wored
no did not work same error
now this
i just want this to work. if it dont imma have to replace all my files i changed for this to work or replace the whole core
could i swap out the inventory system?
your config.lua file is not load in, cause the erro Global Config = nil
means that it does not exsist, i think your config.lua from your inventory is not load in the fxmanifest.lua file.
Example:
shared_scripts {
'@qb-core/shared/locale.lua',
'locales/en.lua',
'config.lua',
}
thank you got it all to work properly i really appreciate you reply fast with the right information!!!
hello i am trying to use this script and everything works except for it doesn't open the inventory when i do /inventory it instead writes this error server sided:
[ c-scripting-core] InvokeNative: execution failed: Argument at index 1 was null. [ script:ps-inventory] SCRIPT ERROR: Execution of native 000000002f7a49e6 in script host failed: Argument at index 1 was null.
when i add back the default files for ps-inventory it shows that i have my cash in my inventory the only error is that when i am using the code that you provide it cannot open the inventory