Raised This Month: $ Target: $400
 0% 

FM_Touch ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-17-2007 , 14:12   Re: FM_Touch ?
Reply With Quote #6

Here !
Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>
 
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"
 
public plugin_init() {
 
 register_plugin(PLUGIN, VERSION, AUTHOR)
 register_forward(FM_Touch,"fwd_touch")
}
 
public fwd_touch(ent,id)
{
 new g_classname[32]
 pev(ent, pev_classname, g_classname, 31)
 
 
 if(equali(g_classname, "class_name"))
 {
  if(get_user_health(id) >= 100)
   return 1;
  else
   set_task(1.5,"give_health",id,_,_,"b")
 }
 return 1;
}
 
public give_health(id)
{
 new health = get_user_health(id)
 
 if(health > 99 )
 {
  set_user_health(id,100)
  remove_task(id)
 }
 
 set_user_health(id,health + 2)
 
 return 1;
}
Don't forget to change class name of entity!
*Updated*
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 06-17-2007 at 14:44.
Alka 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 10:42.


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