[ESX] esx_tk_selldrugs - Advanced drug selling to NPCs

Hi great script having fun with the system, ¿There is a way to make the player get rob on black money?

1 Like
  1. Go to server/main.lua
  2. On line 91, change xPlayer.getMoney() → xPlayer.getAccount(‘black_money’).money
  3. On line 99, change xPlayer.removeMoney(cashRobAmount) → xPlayer.removeAccountMoney(‘black_money’, cashRobAmount)
1 Like

script error esx_tk_selldrugs/client/main.lua:33: badargument #1 ‘pairs’ (table expected, got nil)

i get this for some reason.

What ESX version do you use? Send me a private message and I’ll help you there.

Does this work on ESX 1.1?

Yes, should work fine. But ofc if you face any bugs, you are free to message me and I’ll get them fixed!

Hello I have this error

script error esx_tk_selldrugs/client/main.lua:33: badargument #1 ‘pairs’ (table expected, got nil)

Version esx 1.3 legacy

I use esx multicaracter fivem ,if i restart the ressource its ok

Hey, I know I’m very late, I always forget the check here, but try downloading the latest version, it should possibly be fixed.

Update 1.1.0

  • Added new config option Config.SimpleMode which calculates the price offered and the amount of drugs bought by the NPC a lot simpler (basically just chooses a random value between two numbers)
  • Other minor bug fixes

Update 1.3.0

  • Overall improvements and minor fixes to the code
  • New config option Config.BlacklistedModels, allows you to set ped models that are blacklisted meaning you can’t sell drugs to

Update 1.3.3

  • Small improvements to the code

Update 1.4.1

  • Fixed typo

Update 1.4.5

  • Several improvements and fixes

Update 1.4.6

  • Fixed player not being able to punch after being robbed by the NPC

Update 1.4.7

  • New config option Config.InteractKey

Update 1.4.8

  • Improvements to the code

Update 1.4.9

  • Added webhook to Discord

Update 1.5.0

  • Added function DrugsSold(src, item, amount, price) to the editable client file

Update 1.5.1

  • Added new config option Config.DebugMode

Update 1.5.2

  • Small improvements to the code