PHP Code:
#include < amxmodx >
#include < engine >
public plugin_init()
{
register_touch( "player", "grenade", "TouchEntity" )
}
public TouchEntity( player, ent )
{
new Model[ 20 ]
entity_get_string( ent, EV_SZ_model, Model, charsmax( Model ) )
if( containi( Model, "flashbang" ) != -1 )
// touched flashbang
}
If you want to block the touch, you'll have to hook both player -> grenade and grenade -> player touches.
Also there's nothing wrong in using engine for this purpose.