Raised This Month: $ Target: $400
 0% 

Change health


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 10-16-2005 , 10:04  
Reply With Quote #1

this is how i would do it
Code:
//´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸. #include <amxmodx>   #include <amxmisc>   #include <cstrike> #include <fun> //´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸. #define PLUGIN "Change Health"   #define VERSION "1.0"   #define AUTHOR "Gotrice?"   //´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸. public plugin_init() {       register_plugin(PLUGIN, VERSION, AUTHOR)     register_cvar("amx_startmoney", "500")     register_concmd("amx_hp", "cmd_hp", ADMIN_SLAY, "<target> <hp>") } //´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸. public cmd_hp(id, level, cid) {     if (!cmd_access(id, level, cid, 3))         return PLUGIN_HANDLED         new arg1[32]     new arg2[32]     read_argv(1, arg1, 31)     read_argv(2, arg2, 31)     new health = str_to_num(arg2)     new player = cmd_target(id, arg1, 1)     if (!player) {         console_print(id, "Sorry, player %s could not be found or targetted!", arg1)         return PLUGIN_HANDLED     }     else {         set_user_health(player, health)     }     return PLUGIN_HANDLED } //´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸. public client_putinserver(id) {     if (get_cvar_num("amx_startmoney") > 0) {         cs_set_user_money(id, get_cvar_num("amx_startmoney"))         } else {         cs_set_user_money(id, get_cvar_num("mp_startmoney"))     } } //´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.´¯`·.¸¸.
[ --<-@ ] Black Rose is offline
Reply



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 23:56.


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