Clone git repository into your /resources folder git clone git@github.com:obi23lipnik/bobi-selldrugs.git
Update bobi-methlab/config.lua
Set your inventory resouce by updating Config.inventoryResource (options are ox_inventory and qb-inventory)
(optional)Add a call to client event ‘bobi-selldrugs:client:StartSelling’ to the action that puts you into the drug selling mode
Alternatively you can use the /selldrugs command to turn the selling on and off
(Experimental) You can also set Config.sellingOnByDefault = true inside config.lua which will make selling mode be on by default on player spawn
(optional) Update obi-selldrugs/data/drugs.lua with your chosen sellable drugs and event odds
Update your server.cfg to ensure/start resource bobi-selldrugs
ensure bobi-selldrugs
Must be UNDER all dependencies
Restart server
Ingame example
(using client event ‘bobi-selldrugs:client:StartSelling’ added to radial menu)
REPO
DISCLAIMER
Note that my resource is shipped with the GNU Lesser General Public License v3.0, meaning you’re free to use the full or modified source in your public, private, free or even commercial releases.
And while the license permits such use under the conditions stated (License and copyright notice, Disclose source, State changes, Same license), in practice, I really couldn’t give a f*** weather you choose to grift off of it while honoring these or not.
TL;DR:
You can use the resource however you wish. You do you, my friend.
Code is accessible
Yes
Subscription-based
No
Lines (approximately)
487
Requirements
ox_lib, one of: qb-target / ox_target, one of: qbcore / ox_inventory
Enhancement Suggestion: Remove the requirement to have to toggle corner selling. Would be good if you could set it on the basis of if you approach a NPC with sellable drugs it automatically works.
thanks for the suggestion, but I’m not very comfortable with doing it like that, since the options might crowd other target options on peds you otherwise want to interact with…
If the feature gets more requests I’ll add a config option to have it on by default, alright? If your reply gets 5 hearts I will do it
Fair enough mate, personally this will be the only interaction I use with NPC but others may be different so understand the concern around it. Will see if its something the community will be interested in
Depends on how you would like the player to start dealing drugs, but with QBCore you already have the radial menu option for “Cornerselling” where you can replace the existing event with the bobi-selldrugs one;
Change the cornerselling option inside file: qb-radialmenu\config.lua – change the line: event = 'qb-drugs:client:cornerselling',
to: event = 'bobi-selldrugs:client:StartSelling',
There is also a command /selldrugs that invokes the event
Added experimental ESX support to the latest master; Please check out / download latest release – feedback would be appreciated
Added support for this via config file in the latest master Config.sellingOnByDefault = true
Please check out the latest master / download latest release – feedback would be appreciated
you mean the 1 frame T-Posing between transitions or how the buyers sometimes walk to the wrong spot x) … I’m not the happiest with how the animations look, and I’ll try to fix them in the future
Need to add something for the empty table in ox_target otherwise it drops an error while targeting entities if you have no drugs on you.
local function addTargetEntity(entity, options)
exports.ox_target:addLocalEntity(entity, options)
for _, option in pairs(options) do
cornersellingTargetOptionNames[option.name] = true
end
end