[FilterScript] Drug System - v2.0 - Using Y_Ini - With Video - New Version!
#1

Hello there, this is my first script in a long time since I've last scripted something, it uses the following includes: Y_Ini, ZCMD, sscanf, foreach. This filterscript can both be used for RP servers or Stunt/Other server types.

You can change this script anyway you want but please keep the credits, as I've worked some time on this.
This might be the last version, however, I will fix any minor bugs/problems if there are any.

Commands:

/buydrugs
It brings up a dialog and you have to type the amount of drugs you want to buy ($1000/gram by default)

/usedrugs
Use drugs, there is Cocaine [1](80HP), Weed [2](60HP), Heroine [3](50HP), Opium[4](30HP), Meth[5](15HP)

/mydrugs
You can see how much grams of drugs you have

/givedrugs
You can give drugs to another player

/selldrugs
You can sell drugs to another player. Their price will be calculated per drug as: DRUG_GRAM_PRICE(Default: 1000$) minus- DRUG_DEALER_FEE(Default: 100$)

/acceptdrugs
You can accept the drugs a player wants to sell you.

/drugcmds
It brings up a dialog where you can see all the commands, except only RCON Admins can see the admin commands.

/setdrugs (only for RCON admins)
If you are logged in as RCON Admin you can set a player drug amount, syntax: /setdrugs [player id] [amount]

/agivedrugs (only for RCON admins)
If you are logged in as RCON Admin you can give a player a specific drug amount, syntax: /agivedrugs [player id] [amount]

/checkdrugs (only for RCON admins)
If you are logged in as RCON Admin you can view a player's drug amount, syntax: /checkdrugs [player id]


Changelog v3.0:
Added a message box instead of a text message which shows how much drugs the player have and how much are they worth on the street.
Added /selldrugs command for players to sell drugs to other players. The value by default is 1000$ per gram minus(-) 100$ dealer fee.
Added /acceptdrugs [dealer id] command for players to accept a dealer's deal.
Now you can /givedrugs and /selldrugs or /acceptdrugs only if you are close to the player you're giving/selling to or accepting from.
Added 2 more drug types: Opium(30HP) and Meth(15HP)
Changed Cocaine(80HP), Weed(60HP) and Heroine(50HP) HP value.

Download:

Version 3.0(Newest):
Pastebin: http://pastebin.com/YXveWntQ
Zippyshare: http://www17.zippyshare.com/v/41170618/file.html

Version 2.0(Old):
Pastebin: http://pastebin.com/FJSXnS5d
Zippyshare: http://www37.zippyshare.com/v/33328794/file.html


Version 1.0(outdated):
Pastebin: http://pastebin.com/zZYH9gDG
Zippyshare: http://www53.zippyshare.com/v/38454495/file.html

You will need a folder named "UserDrugs" without "" in your scriptfiles folder!


Bugs:
Currently I didn't found any bugs, If you find any, please report it via PM or a reply down here and I will try to solve them immediately, thanks!

Credits:
Author/Scripter: friezakinght
Thanks to:
****** for - foreach, sscanf, Y_ini
Zeex for - ZCMD


Plugins needed:
sscanf - by ******

Video from v2.0:
https://www.youtube.com/watch?v=MPosKmXMt5k
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)