Raised This Month: $ Target: $400
 0% 

Damage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 04-22-2006 , 08:44  
Reply With Quote #8

Use amx_loosehp <name> <how many times to loose hp>
0 means loose hp until death.
Use the same command to cancel the loosehp.

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_clcmd("amx_loosehp", "loosehp_cmd", ADMIN_SLAY)     register_cvar("amx_looseamount", "1") } public loosehp_cmd(id, level, cid) {     if (!cmd_access(id, level, cid, 3))         return PLUGIN_HANDLED         new szArg[32]     read_argv(1, szArg, 31)     new Target = cmd_target(id, szArg, 3)         new szArg2[3]     read_argv(2, szArg2, 2)     new Times = str_to_num(szArg2)         if (!Times)         Times = 100         if (Target && is_user_alive(Target)) //Forgot to check if alive, thx v3x.         if (!task_exists(id + 69)) set_task(1.0, "loosehp", id + 69, "", 0, "a", Times)         else remove_task(id + 69)         return PLUGIN_HANDLED } public loosehp(TaskID) {     new id = TaskID - 69         if (!is_user_alive(id))     {         remove_task(id + 69)         return PLUGIN_CONTINUE     }         set_user_health(id, get_user_health(id) - get_cvar_num("amx_looseamount"))         return PLUGIN_CONTINUE }
__________________
FatalisDK is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:00.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode