Raised This Month: $ Target: $400
 0% 

Touch - yes again


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr.G
Senior Member
Join Date: Nov 2008
Old 01-28-2009 , 12:00   Re: Touch - yes again
Reply With Quote #1

Iam pretty sure HAM cant catch it since the entity i made to block those exploits isnt default entitys...

I did tryed like this but nothing happend...

PHP Code:
register_forward(FM_Touch,"hook_touch"
PHP Code:
public hook_touch(ptr,ptd)
{
 if(
get_pcvar_num(p_enable))
 {
  static 
szClassName[32]
  
pev(ptrpev_classnameszClassNamesizeof szClassName 1)
  
  if(
equali(szClassName,"weapon_handgrenade") || (equali(szClassName,"weapon_stickgreande")))
  {
   new 
obj_classname[32]
   
pev(ptdpev_classnameobj_classnamesizeof obj_classname 1)
   if(!
equali(obj_classname"nade_fix"))
    return 
FMRES_IGNORED
    
   
new Float:origin[3]
   
origin[0] = 200.0
   origin
[1] = 720.0
   origin
[2] = 440.0
   set_pev
(ptr,pev_origin,origin)
  }
 }
 return 
FMRES_IGNORED

And how bout the admin immunity...
__________________
Dr.G is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-28-2009 , 14:19   Re: Touch - yes again
Reply With Quote #2

Quote:
Originally Posted by Dr.G
Iam pretty sure HAM cant catch it since the entity i made to block those exploits isnt default entitys...
RegisterHamFromEntity()
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-28-2009 , 14:23   Re: Touch - yes again
Reply With Quote #3

You didn't made the grenade but the touched entity, to, RegisterHam will work with classname "grenade".
If you want to hook the touch with your custom entity, then you need to hook it with the initial classname (in most cases : "info_target"), but that's not what you want to do.
It's better to use ham for this touch ;)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-28-2009 , 14:28   Re: Touch - yes again
Reply With Quote #4

Also
PHP Code:
   new Float:origin[3]
   
origin[0] = 200.0
   origin
[1] = 720.0
   origin
[2] = 440.0
   set_pev
(ptr,pev_origin,origin
Why are you creating a new variable instead of using the values you want?
PHP Code:
   set_pev(ptr,pev_origin,Float:{200.0,720.0,440.0}) 
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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