[FREE] bobi-selldrugs - Better corner selling script [QBCore / ESX (experimental) / "Standalone" with ox_inventory]

Ever felt like pushing drugs onto good-assuming pedestrians? Well, this is the resource for you.

GTAV FiveM resource for drugs corner selling (QBCore & ox_inventory support)

Dependencies

Installation

  1. Clone git repository into your /resources folder git clone git@github.com:obi23lipnik/bobi-selldrugs.git
  2. Update bobi-methlab/config.lua
  • Set your inventory resouce by updating Config.inventoryResource (options are ox_inventory and qb-inventory)
  1. (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
  1. (optional) Update obi-selldrugs/data/drugs.lua with your chosen sellable drugs and event odds
  2. Update your server.cfg to ensure/start resource bobi-selldrugs
  • ensure bobi-selldrugs
  • Must be UNDER all dependencies
  1. Restart server

Ingame example

(using client event ‘bobi-selldrugs:client:StartSelling’ added to radial menu) Video with example of use

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
Support Yes
8 Likes

Wheres the link to the repo?

2 Likes

my bad, lol… Added it now, its under the Repo link section

addding a slash command option to start selling would be FIRE!!!\

1 Like

Added it (/selldrugs), check out the latest master or download v0.5 release: Release v0.5 · obi23lipnik/bobi-selldrugs · GitHub

1 Like

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.

8 Likes

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 :grin:

2 Likes

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 :smiley:

2 Likes

Hi where must i add this 3. Add a call to client event ‘bobi-selldrugs:client:StartSelling’ to the action that puts you into the drug selling mode

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

ahha nice I like it this way!

Please esx support too

1 Like

Will do my best to work on it in the coming week. Currently you can still use the resource on ESX, but only if you use ox_inventory.

ESX? please

Just pushed a new release that fixes the issue with ox_target (actions were not working properly) … Sorry for the bug guys.

You can find it here:

1 Like

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

1 Like

Great i ll check and inform you as soon as possible

1 Like

its working great in esx…nice…only issue is with animation sync :laughing:

1 Like

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

1 Like

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
1 Like