Touch - yes again
I am about to make a plugin that block some grenade exploits in dod_avalanche. I can easyly create some small solid boxes that makes the grenades bounch off when ppl try to toss a nade into one of those spots, but since its solids it makes some odd "bumps" in the map that i dont like.
So is it possible catch when a grenade touches that entity i have created, and send the grenade eg. outside the map? And would it be possible catch the owner of the grenade and give him a warning and/or even add admin immunity? Thanks in advance! |
Re: Touch - yes again
yes it is
PHP Code:
|
Re: Touch - yes again
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:
PHP Code:
|
Re: Touch - yes again
Quote:
|
Re: Touch - yes again
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 ;) |
Re: Touch - yes again
Also
PHP Code:
PHP Code:
|
Re: Touch - yes again
So i need to register both entitys to the same forward?? Shiiit my brain is boiling....
ups that variable was a copy paste thing... PHP Code:
|
Re: Touch - yes again
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:
|
Re: Touch - yes again
ye Dr.G can you give me origins/ or already created entitys code, for block that bug pls
|
Re: Touch - yes again
yea ofcource u can... i still cant catch that damn touch tho lol. Ill send the code tomorrow or so...
|
| All times are GMT -4. The time now is 01:53. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.