Raised This Month: $ Target: $400
 0% 

healing?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
drakeris
Senior Member
Join Date: Jul 2009
Old 11-08-2009 , 08:57   healing?
Reply With Quote #1

i know its possible but how i cannot figure it out so could anyone here give me a hand nd atelast show how to make for example i press e i start healing others or my self
drakeris is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-08-2009 , 09:17   Re: healing?
Reply With Quote #2

There are plugins which do that, please search.
__________________
Arkshine is offline
byetovice
Senior Member
Join Date: Nov 2009
Location: Turkey
Old 11-08-2009 , 09:50   Re: healing?
Reply With Quote #3

try it :
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define PLUGIN "Healing"
#define VERSION "1.0"
#define AUTHOR "author"
 
public plugin_init() {
 
register_plugin(PLUGINVERSIONAUTHOR)
 
register_clcmd("heal","cmd_heal")
 
register_cvar("amx_heal_persecond","1")
 
}
public 
cmd_heal(id)
{
 new 
Health get_user_health(id)
 if(
Health!=100//if you need healing
 
{
  
set_task(1.0,"plus_hp",id,"",0,"b"//plus_hp for per seconds
 
}
 else
 {
  
client_print(id,print_center,"You dont need healing!")
 }
}
public 
plus_hp(id)
{
 if(
Health!=100//if you need healing
 
{
  
set_user_health(id,get_user_health(id)+get_cvar_num("amx_heal_persecond"))
  
//an example ... sethp(myhp+1)
 
 
}
 else
 {
  
//if your hp is 100, stop the healing
 
remove_task(id)
 
client_print(id,print_chat,"Your healing is stopped!")
 }

byetovice 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 17:33.


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