[FilterScript] Yet Another Drug System
#1




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
****** & maddinat0r & Misiur for sscanf and YSI.

Downloads

Reply
#2

Dope shit bro
Reply
#3

you work for CARTELLBEAN resources son well played keep it up THE CARTELLBEAN always pay their depts
Reply
#4

Yet another great system.
Good job!
Reply
#5

impressed very nice!!! i really like it!
Reply
#6

Suggestion : different type of drugs have different effects as well they regenerate health at different speed? But only were can be grown.
Reply
#7

Wow nice
Reply
#8

I'm using your filterscripts,you have Player_Init functions on Lumberjack system and this filterscript.
would that be a bug or glitch if I'm using twice at the same time?
Reply
#9

Nice work (ellerinize sağlık hocam)
Reply
#10

Another nice job!
Reply
#11

Good job (Eline sağlık krdş)
Reply
#12

Quote:
Originally Posted by Bradley7
Посмотреть сообщение
I'm using your filterscripts,you have Player_Init functions on Lumberjack system and this filterscript.
would that be a bug or glitch if I'm using twice at the same time?
As far as they are not in the same script, no. If you got them in the same script, make sure you will not overwrite the same functions (if any).
Reply
#13

Thanks guys.

Quote:
Originally Posted by [ND]xXZeusXx.
Посмотреть сообщение
Suggestion : different type of drugs have different effects as well they regenerate health at different speed? But only were can be grown.
Maybe in the future with an addiction feature? idk, depends on how bored I get honestly

Quote:
Originally Posted by Bradley7
Посмотреть сообщение
I'm using your filterscripts,you have Player_Init functions on Lumberjack system and this filterscript.
would that be a bug or glitch if I'm using twice at the same time?
There shouldn't be any issues as Private200 said.

If you plan to merge said scripts into your gamemode or something just make sure you rename one of those functions.
Reply
#14

Quote:
Originally Posted by Bradley7
Посмотреть сообщение
I'm using your filterscripts,you have Player_Init functions on Lumberjack system and this filterscript.
would that be a bug or glitch if I'm using twice at the same time?
Yep you have to hook it if it's a callback, otherwise there should not be any issues if they're different filterscripts.
Reply
#15

Quote:
Originally Posted by rootcause
Посмотреть сообщение
Thanks guys.



Maybe in the future with an addiction feature? idk, depends on how bored I get honestly



There shouldn't be any issues as Private200 said.

If you plan to merge said scripts into your gamemode or something just make sure you rename one of those functions.
Alright good luck, i meant weed not were before though.
Reply
#16

Can you make /plant harvest is only allowed for your plant?
Reply
#17

sir can you give me one this pwn or amx
Reply
#18

Very nice man.
P.S. What mod do you use for dialog transparency?
Reply
#19

Код:
C:\Documents and Settings\Jonas\Desktop\samp037_svr_R2-1-1_win32\pawno\include\izcmd.inc(49) : error 004: function "OnPlayerCommandReceived" is not implemented
C:\Documents and Settings\Jonas\Desktop\samp037_svr_R2-1-1_win32\pawno\include\izcmd.inc(106) : error 004: function "OnPlayerCommandPerformed" is not implemented
C:\Documents and Settings\Jonas\Desktop\samp037_svr_R2-1-1_win32\pawno\include\izcmd.inc(114) : error 004: function "OnPlayerCommandPerformed" is not implemented
C:\Documents and Settings\Jonas\Desktop\samp037_svr_R2-1-1_win32\pawno\include\sqlitei.inc(1) : error 010: invalid function or declaration
C:\Documents and Settings\Jonas\Desktop\yads.pwn(1081) : error 084: state conflict: one of the states is already assigned to another implementation (symbol "ScriptInit_OnFilterScriptInit")
C:\Documents and Settings\Jonas\Desktop\yads.pwn(1120) : error 021: symbol already defined: "OnPlayerCommandText"
help?
Reply
#20

NICE FILESCRIPT BUT HAVE A ERROR CAN YOU GIVE ME ONE THIS PWN AND AMX
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)