View Single Post
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-09-2013 , 12:29   Re: HEs destroy grenades
Reply With Quote #10

The way you used to retrieve nade type may be not accurate.

Correct way is following :

PHP Code:
GetGrenadeTypeentbool:bCheckClass true 

    if( 
bCheckClass 
    { 
        new class[
9
        
pev(entpev_classname, class, charsmax(class)) 
        if( !
equal(class, "grenade") ) 
        { 
            return 

        

    } 

    if( 
get_pdata_bool(entm_bIsC4) ) 
    { 
        return 
CSW_C4 
    


    new 
usEvent get_pdata_short(entm_usEvent_Grenade
    if( !
usEvent 
    { 
        return 
CSW_FLASHBANG 
    


    static 
m_usHgrenExplo // , m_usSmokeExplo 
    
if( !m_usHgrenExplo 
    { 
        
m_usHgrenExplo engfunc(EngFunc_PrecacheEvent1"events/createexplo.sc"
        
// m_usSmokeExplo = engfunc(EngFunc_PrecacheEvent, 1, "events/createsmoke.sc") 
    


    return 
usEvent == m_usHgrenExplo CSW_HEGRENADE CSW_SMOKEGRENADE 

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline