A little bit of register_touch() would make you happy, I assume.
Just gotta find the thrown hegren classname, and you're sorted.
(To make a nade explode, I think you set its next think time to now+0.1 )
EDIT: It's called "grenade"
Here is how to do it with FakeMeta :
PHP Code:
#include <amxmodx>
#include <fakemeta>
public plugin_init()
{
register_forward(FM_Touch,"on_touch") // call the function "on_touch" when two ent's collide
}
public on_touch(ent1,ent2)
{
static class1[32],class2[32],temp,Float:thetime; // use static variables, since this could be called a lot ...
pev(ent1,pev_classname,class1,sizeof class1 - 1) // get the classname of ent 1
pev(ent2,pev_classname,class2,sizeof class2 - 1) // and ent 2
if ( equal(class1,"player") && equal(class2,"grenade") ) // if it's a player and a 'nade
{
global_get(glb_time,thetime) // get the current time
set_pev(ent2,pev_nextthink,thetime+0.1) // tell it to "think" (explode) in 0.1 seconds
return ; // and quit
}
if ( equal(class2,"player") && equal(class1,"grenade") ) // same as above, but this time the other ent is the nade. (this might not ever happen, I don't know whether, say, ent1 will always be the one with the lower ent-id )
{
global_get(glb_time,thetime)
set_pev(ent1,pev_nextthink,thetime+0.1)
return ;
}
}
If you really want it in engine I can probably show you how it's done with engine.