The way you used to retrieve nade type may be not accurate.
Correct way is following :
PHP Code:
GetGrenadeType( ent, bool:bCheckClass = true )
{
if( bCheckClass )
{
new class[9]
pev(ent, pev_classname, class, charsmax(class))
if( !equal(class, "grenade") )
{
return 0
}
}
if( get_pdata_bool(ent, m_bIsC4) )
{
return CSW_C4
}
new usEvent = get_pdata_short(ent, m_usEvent_Grenade)
if( !usEvent )
{
return CSW_FLASHBANG
}
static m_usHgrenExplo // , m_usSmokeExplo
if( !m_usHgrenExplo )
{
m_usHgrenExplo = engfunc(EngFunc_PrecacheEvent, 1, "events/createexplo.sc")
// m_usSmokeExplo = engfunc(EngFunc_PrecacheEvent, 1, "events/createsmoke.sc")
}
return usEvent == m_usHgrenExplo ? CSW_HEGRENADE : CSW_SMOKEGRENADE
}
__________________