This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Force a remote pipe to explode?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Matheus28
Senior Member
Join Date: Aug 2009
Old 11-12-2009 , 16:10   Force a remote pipe to explode?
Reply With Quote #1

The question is in the title.
Matheus28 is offline
Matheus28
Senior Member
Join Date: Aug 2009
Old 11-12-2009 , 16:19   Re: Force a remote pipe to explode?
Reply With Quote #2

I have an idea, Can I make a pre-think hook to set the attack2 of the demoman, would that work?

EDIT:
It didn't work.

Last edited by Matheus28; 11-12-2009 at 18:46.
Matheus28 is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 11-12-2009 , 22:06   Re: Force a remote pipe to explode?
Reply With Quote #3

PHP Code:
// gameconf file (later specified on the LoadGameConfigFile line)
"Games"
{
    
"tf"
    
{
        
"Offsets"
        
{
            
"Detonate"
            
{
                
"windows"    "207"
                "linux"      "208"
            
}
        }
    }
}

// global vars
new Handle:g_hDetonate;

// setup stuff (OnPluginStart is a good place)
new Handle:hGameConf LoadGameConfigFile("somefile");

StartPrepSDKCall(SDKCall_Entity);
PrepSDKCall_SetFromConf(hGameConfSDKConf_Virtual"Detonate"); //CTFGrenadePipebombProjectile::Detonate(void)
g_hDetonate EndPrepSDKCall();

// inside your function
SDKCall(g_hDetonateentity); // "entity" being the index of the sticky bomb to detonate 
bl4nk is offline
Matheus28
Senior Member
Join Date: Aug 2009
Old 11-13-2009 , 11:15   Re: Force a remote pipe to explode?
Reply With Quote #4

Thank you so much!
Matheus28 is offline
Matheus28
Senior Member
Join Date: Aug 2009
Old 11-13-2009 , 11:16   Re: Force a remote pipe to explode?
Reply With Quote #5

Hey, How did you find it?
Matheus28 is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 11-13-2009 , 13:09   Re: Force a remote pipe to explode?
Reply With Quote #6

Decompiled the linux binary with IDA, looked up the functions for CTFGrenadePipeBombProjectile (which is the netclass for the sticky bombs) and found the one that causes them to explode. I then dumped the vtable for the class and found the offset to use to call the function.
bl4nk is offline
Matheus28
Senior Member
Join Date: Aug 2009
Old 11-13-2009 , 14:41   Re: Force a remote pipe to explode?
Reply With Quote #7

It looks very hard to do o_O
Matheus28 is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 11-13-2009 , 17:28   Re: Force a remote pipe to explode?
Reply With Quote #8

For those that don't know how to do it, sure. It took me no more than 5 minutes to put everything together.
bl4nk 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 19:05.


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