Raised This Month: $ Target: $400
 0% 

Touch - yes again


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-28-2009 , 16:00   Re: Touch - yes again
Reply With Quote #8

No, only RegisterHam with "grenade" classname, or weapon_handgrenade or whatever is this entity classname.
If it's the same as cs, as soon as you have launched the nade, classname is "grenade" (in fact the launched nade is a new entity and the nade that you were holding doesn't exist anymore).

So, something like this :

PHP Code:
RegisterHam(Ham_Touch"grenade""Grenade_Touch")

public 
Grenade_TouchiNade iEnt )
{
    if( !
pev_validiEnt ) )
        return 
HAM_IGNORED
    
static szClassName[9]
    
pev(iEntpev_classnameszClassNamecharsmax(szClassName))
    if( !
equalszClassName"nade_fix") )
        return 
HAM_IGNORED
    engfunc
(Engfunc_RemoveEntityiNade)
    return 
HAM_SUPERCEDE

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 01:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode