Hi,
Everytime i drop something there is a red marker on the ground. i want this to be a bag, can anyone help me with the code? i cannot find where to change it…
I cant find it anywhere on the forum…
ESX
Hi,
Everytime i drop something there is a red marker on the ground. i want this to be a bag, can anyone help me with the code? i cannot find where to change it…
I cant find it anywhere on the forum…
ESX
Rrad the setup Documentation in the config file (cfg) is an option to turn off markers and to select a prop
but where is the config file? i dont see any config files in my map and downloaded it from ox github ![]()
Base configuration of the inventory is done using convars. They are either set in your server.cfg file or in a separate file that is imported using the exec command. Take a long look at the ox_inventory documentation. Take your time. Go slow. It’s really very well detailed, step by step.
i will definitely look into this thank you
I took my time and i found this:
setr inventory:dropmodel “prop_med_bag_01b”
and that i have to put it in config/client however…
i dont have a config file and only get errors when putting in client ![]()
setr inventory:dropmodel “prop_med_bag_01b”
This is a convar that goes either in your server.cfg or a file that includes the other convars required by ox_inventory Sometimes it’s an external file called with an exec command.
You’re on the right track. Please do not get the wrong idea. I am not trying to be difficult, but I won’t do this for you. Running a server is not easy. There’s a lot to it and a lot of reading and learning. It’s specifically why I do not run a server.
Thanks!
Oh no I wouldn’t want you to do it for me either, I love doing it myself and figuring out how shit works!
But now I was just really stuck where to put it
As far as I know, it’s a convar in the server.cfg or as an exec command in the server.cfg
Look for a line like exec @ox_inventory/config.cfg
Then in the ox_inventory folder there will be a file called config.cfg that has all the convars listed.
What’s a convar? More information can be found here
And the details of that config.cfg can be found here
Hope this helps.
Hello Kwarktoetjee, do u have found pls ? i have the same issue
Could just read the answer that I gave him. It’s literally right there above you.
i would like to have a tutorial, too. Cant figure it out…
Config docu shows using convars. Which to my minimal knowledge is either implemented in the code on cliant.lua which def requires coding knowledge, or Convars can be played in the server CFG file at the bottom by itself. ChatGPT could help with learning its what ive been using to ask all my questions. Paste this at the botttom of ur server.cfg file
setr inventory:dropprops true
setr inventory:dropmodel “prop_med_bag_01b”
FOR CUSTOM PROPS FOR DROPPED ITEMS
put this in any of your resources server.lua file, weapons must be in caps
local dropItems = {
burger = `prop_cs_burger_01`,
water = `prop_ld_flow_bottle`,
WEAPON_PISTOL = `xm3_prop_xm3_pistol_xm3`,
}
exports.ox_inventory:registerHook('swapItems', function(payload)
if payload.toInventory ~= 'newdrop' then return end
local item = payload.fromSlot
local items = { { item.name, payload.count, item.metadata } }
local dropId = exports.ox_inventory:CustomDrop(item.label, items,
GetEntityCoords(GetPlayerPed(payload.source)), 1, item.weight, nil, dropItems[item.name])
if not dropId then return end
CreateThread(function()
exports.ox_inventory:RemoveItem(payload.source, item.name, item.count, nil, item.slot)
Wait(0)
exports.ox_inventory:forceOpenInventory(payload.source, 'drop', dropId)
end)
return false
end, {
itemFilter = dropItems,
typeFilter = { player = true }
})
I was having this exact same problem. I solved it by writing the convars in my server’s CFG file, for example, with this: setr inventory:target true
It worked for me; any other way wouldn’t work.
Thanks, friends.
is mad easy just go to your server cfg and under your ox scripts put setr inventory:dropprops true
and then your done people just making it hard and once you do that it already comes with a prop bag
I have the same problem with dropitem, I tried everything you wrote, but I really don’t know what you mean, where should I put the inventory:dropprops, true setr, or when I create the config folder and restart the server, I get a red dot on the floor instead of a bag. Please, if someone could tell me or send me a picture of how you did it, I would be very grateful if anyone could send it @Jah_Staxks7 @DaveGaffer.