[Release] [ESX] Sell to NPC

The main focus of the script is to be simple and optimized and have one goal which is to enable the ability to sell to NPC. Unfortunately, I won’t be adding this type of feature to the script. You can make a fork and request someone else to support you with it.

It works. Problems occur when 2 people are working at the same time on one server :smiley:

It cant read the config

Download the latest version.

Can we add more drugs ? if yes, can you tell me the way? i will check after

Well there should be a config for the drugs. Pretty easy then to set up. Nice script btw

1 Like

I’ll have a config setup very soon. I’m thinking of a different, unique way I can setup the config. All other sell drugs to NPC configs are the same. I got an idea in mind, bare with me :slight_smile:

Can you add a system that when a NPC calls the cops a player can hit a button the get the location (gps) on there map/mini map. (with a timer so you dont get spammed hard every damn second because 10 players are selling drugs :D)

1 Like

the script works very well for my dev but when I sell I have the message press “E” to sell but I can do E nothing happens

I just realized. You can sell drugs to animals x)

1 Like

Any errors pop up in F8 or server side?

Animals like the weed too

1 Like

Yeah :D. I noticed one thing more. You can go minus in items. I had one weed left. And sold 3 of them :stuck_out_tongue:

Fixed. https://github.com/FlawwsX/np_selltonpc/commit/463625d9feb0700aebcc25cb3395c0ff6a8e742f

Hmm. Something isnt right. Now it sells 5 of them even if I have 1 left and the 1 dont dissapear. And it sends 2 notifications.

My bad, I put the notification outside the if statement causing it to trigger regardless of the amount of weed you have. Should be fixed in the newest release.

Update 1.0.3

  • Added multiple drugs support
  • Made more stuff configurable
  • Shrunk and organised the code a little more.
  • Messed around with chances.

He didn’t seem to check the police officers at work, so people didn’t need the police to sell drugs. :rofl:

Yeah, not all servers require police to sell drugs. Feel free to make a pull request though or just a suggestion rather than taking the piss.

How can I add it so that he can check the police at work, can you teach me? :rofl:

I like this very much :cry: