03.06.2007, 05:59
Heres a simple drug script for player health i made for my server. It allows you you purchase drugs on the fly for health.
Heres wut it scrolls when you type /drugs:
-------------= Drug's To Buy =------------
Weed: costs $1000 - Adds 20% Health
Cocaine: costs $2000 - Adds 40% Health
Speed: costs $3000 - Adds 60% Health
Extacy: costs $4000 - Adds 80% Health
---------Usage: /get(drugname)------------
The script checks for 2 things: Player Money and Player Health:
If you dont have enough money, it wont let you buy the drug, also if the Percent of Health the drug gives you exceeds 100% of the players health it will tell you to buy a cheaper drug, so your health does not exceed 100%
Heres the pasteable code link from pastebin:
http://sykozscripts.pastebin.com/920965
Heres wut it scrolls when you type /drugs:
-------------= Drug's To Buy =------------
Weed: costs $1000 - Adds 20% Health
Cocaine: costs $2000 - Adds 40% Health
Speed: costs $3000 - Adds 60% Health
Extacy: costs $4000 - Adds 80% Health
---------Usage: /get(drugname)------------
The script checks for 2 things: Player Money and Player Health:
If you dont have enough money, it wont let you buy the drug, also if the Percent of Health the drug gives you exceeds 100% of the players health it will tell you to buy a cheaper drug, so your health does not exceed 100%
Heres the pasteable code link from pastebin:
http://sykozscripts.pastebin.com/920965