http://www.youtube.com/watch?v=b2fo762daqI |
(go here if you can't see the video: https://youtu.be/b2fo762daqI)
Information
You can buy seeds from drug dealers to grow drugs and sell them to drug dealers/other players.
Drug dealers can run out of drugs(they don't have infinite supply, only what players sell to them) so you can sell your harvested drugs to them for the price they decided (it's not that much but they always buy your product), or you can ignore the dealers and sell your drugs to others with your own price per gram using /selldrugs.
Or you can keep the drugs for your own use, they regenerate health after all.
Config
#define USE_DRUNKLEVEL - Remove this line if you don't want SetPlayerDrunkLevel to be used while being on drugs.
#define PLAYER_LIMIT - How many seeds can a player plant? (Default: 5)
#define PLANT_MAX_GROWTH - How many grams of drugs can a fully grown plant yield on harvesting? (Default: 75)
#define GROWTH_INTERVAL - Interval of plant growth event, plants will grow every X seconds. (Default: 45)
#define ROT_INTERVAL - Life time of a fully grown plant, after X seconds the plant will rot and get destroyed. In seconds. (Default: 300)
#define CARRY_LIMIT - How many grams of drugs a player can carry on themselves? (Default: 150)
#define SEED_LIMIT - How many drug plant seeds a player can carry on themselves? (Default: 25)
#define SEED_PRICE - Price of a drug plant seed. (Default: 50)
#define DRUG_BUY_PRICE - Buying price for a gram of drugs. Players'll pay "this price * grams" while buying drugs from dealers. (Default: 20)
#define DRUG_SELL_PRICE - Selling price for a gram of drugs. Players'll get paid "this price * grams" while selling drugs to dealers. (Default: 16)
Commands
/usedrugs [grams] - Consumes specified amount of drugs, will make your health regenerate depending on how many grams you consumed.
/givedrugs [player id] [grams] - Gives specified amount of drugs to specified player for free.
/selldrugs [player id] [gram price] - Sends an offer to the specified player, if the player decides to buy drugs from you because dealers don't have any, you get paid and they get their drugs. Pretty simple.
/drugstats - Shows your drug stats like consumed drugs, money sold on drugs, money earned selling drugs etc.
/dealer - Opens the drug dealer menu if you're near one.
/plant - Has 2 options which are place and harvest.
-> /plant place Places a drug plant on your location if you have a seed. Your plant will grow over time. You can buy seeds from drug dealers.
-> /plant harvest Harvests a drug plant if the nearest plant is ready to harvest. You can tell a drug plant is harvestable when it has leaves. If you harvest a plant that isn't yours, its owner will get notified.
RCON Only:
/createdealer [skin id] - Creates a drug dealer on your location.
/setdealerskin [dealer id] [skin id] - Changes the specified drug dealer's skin.
/setdealerpos [dealer id] - Moves the specified drug dealer to your position.
/removedealer [dealer id] - Removes the specified drug dealer.
Notes
* Drug plants doesn't get saved, I may add saving for them in the future but I don't see it being needed that much right now.
* If you're getting compile errors, make sure you're using the latest versions of everything.
Credits
Slice for SQLite Improved
Incognito for Streamer Plugin
Yashas for Improved ZCMD
Y_Less & maddinat0r & Misiur for sscanf and YSI.
Downloads