Hello there! In preparation for more drug scripts, I needed a way to get the drugs onto the streets so with this I bring you, my version of selling drugs.
Dependencies: ESX, PolyZone,bt-target, mythic_notifty
The ones in BOLD are Required and can easily be found via a forum search. You can replace mythic_notify with any notification of your choice.
The script uses bt-target’s AddTargetModel to make the gang peds interactable (Sell Drugs)
Includes a Server Event to wipe someones reputation (I use this on my server incase the person goes to jail, to “clear their street cred” essentially)
– This is a great thing because it encourages gangs or people that produce drugs to sell to a third party, who in turn is able to make a profit off the purchase as long as their rep stays high. I feel like this brings in a whole new quality of RP to the drug selling process, instead of everyone just being a producer/seller all in one, it breaks it up.
Peds randomly choose a drug and an amount from your list of drugs
Once interacted with, the ped is added to a table and is no longer able to buy drugs from you
– Even if you don’t have the drug the ped wants, and no sale is made he will still no longer buy from you. This is to prevent people from just spam selling drugs to the same few peds.
Every gang member of the Ballas, Vagos, and The Families are able to purchase drugs, and more ped types are easily addable.
Have as many drugs as you want, with unique prices for each drug added straight into the config.
Gain Reputation for every SALE of drugs (Not drug sold, but each successful sale)
– Set min/max reputation gained in the config.
– Includes a max reputation so drug selling does not get out of hand if someone managed to grind a ton of reputation.
Reputation comes into play once a sale has been initiated and you have the drug/amount the ped desires, the final price is determined as follows
– Base price of drug * Amount sold + (Players Reputation * 0.2)
So for example;
at 0 Reputation 1 coke is $50. 4 Coke is $200
at 260 Reputation 1 coke is $63. 4 Coke is $252
Comes out to a $52 dollar increase in the overall price, which is a $13 increase per drug sold.
Notification & Blip for cops indicating street name and location of where the drug selling is taking place (Delivered via mythic_notify, but easily adapted to any notification system you use).
Requires you to add another column into your users table, “drugrep”. SQL Is included.