[ESX stasiek_selldrugs] Sell Drugs to NPC +dispatch NEW! 🚓



@Stasiek would it be possible to maybe add area’'s where you can sell each drug to NPC’s?

Ex you can only sell weed on grovestreet, and you can sell meth in a different area so on?


Yea it’s possible to do. :wink:


Hi there @Stasiek, I was wondering if you could tell me if I’m on the right track. I want to give the player a wanted level and notification when the cops are called. The problem I’m having is that the players say EVERYONE gets the wanted level and notification and not just the player that’s selling the drugs. I added this at line 68 of client:

if Config.CallCops then
	local randomReport = math.random(1, Config.CallCopsPercent)
	if randomReport == Config.CallCopsPercent then
		-- Added wanted level and ESX notification
		SetPlayerWantedLevel(pid, 3, 0)
		SetPlayerWantedLevelNow(pid, 0)

Is this the correct location for this type of change?


Weird. In my opinion this should work anyway try to change pid to PlayerId() If it won’t work you have to wait next 24h before I back to home :wink:


That did the trick, thanks so much for the help!


Actually think it would be cool, being able to do different areas where you can sell the more high risk area you are selling in, the higher price, let’s say selling weed on grovestreet, gives you more, then selling weed a different place in the city.

The idea for the system would be the following.

It could be done with 3 options

  1. Only able to sell in thos zone’s setup for each drug (multiple zone’s pr. drug would be cool, and multiple prices.

  2. Zone + Rest of the city, ex. Weed can be sold everywhere, but you will get more for it at grovestreet.

  3. All the city.

I know some of the big RP servers are doing something like this, and i think it’s a very cool feature with out doubt.


Hmm. Great idea. Thank you for this I will think about it :wink:


Good evening, I’m French and I’m having problems,
I have two policeman connect is when I approach a ped, I have an error when I press (E) to sell. And a notification error. Help me


Why wouldn’t you share the errors?


Yes, please show me your errors


The trouble is fixed, “ShowHelpNotification” that I replace with "ShowNotification


!Update! [Download plugin]

  • bug fixes
  • distance and point from city
Config.DistanceFromCity = 10000 -- set distance that player cant sell drugs too far from city
Config.CityPoint = {x= -255.94, y= -983.93, z= 30.21}


In what measurement is config.DistanceFromCity? Like how far exactly is 10000?


Any chance of adding a Sell feature which includes selling for a random price? For example…

Weed, sells for 50-93
Meth, sells for 274-388


This would be a beautiful feature, so that you can randomize the sale price per npc :):slightly_smiling_face:

ALSO I noticed in the config, Maybe you can clear this up for me…

Config.CallCops = true -- if true and if ped reject your offer then there is 40% chance that ped will call cops
Config.CallCopsPercent = 1 -- (min1) if 1 cops will be called every time=100%, 2=50%, 3=33%, 4=25%, 5=20%

Does Config.CallCops guarantee a 40% chance or did the CallCopsPercent overwrite that? Just wanted to Clarify. :smiley:


10000 is whole map. Set it to 2000 maybe :slight_smile:


I think random price is a good idea to improve in next update. Also I have to change Config.CallCops description. I have changed it in github but I forgot to do this there thx for advice :slight_smile:


When are you thinking for the next update? I’m excited for that update on the drugs! :smiley:


Idk maybe in next 2 days :wink:


You are a saint! Appreciate all your efforts!


Is there a feature/way to disable the Distance thing? I want people to be able to sell across the map. What would i set the 10,000 to for distance from city?