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 , 09:08   Re: FM_Touch ?
Reply With Quote #2

Something like this!
Code:
#include <amxmodx>
#include <fakemeta>
 
#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)
 
 /*static health
 health = pev(id,pev_health)*/
 
 if(equali(g_classname, "class_name"))
 {
  set_pev(id,pev_health,100)
 }
}

Or if you want to call a contiousy a function a set_task wher you check class!
Code:
 if(equali(g_classname, "class_name"))
 {
  set_task(1.0,"give_health",id,_,_,"b")
 }
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 06-17-2007 at 09:11.
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