PTC methoud

Posts 115 of 16 · Page 1 of 2
PTC methoud
Does anyone have the newist ptc method. Like i cant find it out. Please if some one has it share it.
typedef int (__cdecl* RunConsoleCommand_T)(const char* szCommand);
static RunConsoleCommand_T RunConsoleCommand = (RunConsoleCommand_T) 0x485E10;
Quote Originally Posted by flameswor10 View Post
typedef int (__cdecl* RunConsoleCommand_T)(const char* szCommand);
static RunConsoleCommand_T RunConsoleCommand = (RunConsoleCommand_T) 0x485E10;
Thank you.
The above one is gordons. Its the best.... u can also use this:

typedef int (__cdecl* ptc_t)(char* cmd);
ptc_t PTC = (ptc_t)0x485E10; //same address

Then do

PTC("ShowFps 1")
Quote Originally Posted by CAFlames View Post
The above one is gordons. Its the best.... u can also use this:

typedef int (__cdecl* ptc_t)(char* cmd);
ptc_t PTC = (ptc_t)0x485E10; //same address

Then do

PTC("ShowFps 1")
There the same
Quote Originally Posted by whit View Post


There the same
nah, mines shorter (you dont need all that static and sz crap)
Why do you typedef it as int instead of void?
Quote Originally Posted by whatup777 View Post
Why do you typedef it as int instead of void?
Because u define it.. not declare something inside it. typedef is in globals. its not like:

typedef (w/e){
pt_c PTC(that stuff here)
}
Quote Originally Posted by CAFlames View Post


Because u define it.. not declare something inside it. typedef is in globals. its not like:

typedef (w/e){
pt_c PTC(that stuff here)
}
Type Definitions Dont have to be in globals...
Quote Originally Posted by whit View Post


Type Definitions Dont have to be in globals...
I no they dont have to be... but they function more as globals than a void... like its saying "This means that... so whenever you see this, it means the same thing as that."
Quote Originally Posted by CAFlames View Post


I no they dont have to be... but they function more as globals than a void... like its saying "This means that... so whenever you see this, it means the same thing as that."
No lol
Whatup meant why is it a type definition for when it could just be void
ex.. typedef void (blah blah )
typedef void (_cdecl * RunConsoleCommand)(char * szCommand);

...
Quote Originally Posted by whatup777 View Post
typedef void (_cdecl * RunConsoleCommand)(char * szCommand);

...
Because :

Code:
virtual LTRESULT	RunConsoleCommand(const char* pszCommand) = 0;
Quote Originally Posted by Crash View Post
Because :

Code:
virtual LTRESULT	RunConsoleCommand(const char* pszCommand) = 0;
Oh shanpz. Guess I have to use int.
void __cdecl pPTC( const char* szCommand)
{
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
if( dwCShell != NULL )
{
DWORD *LTClient = ( DWORD* )( (dwCShell + NEWADDRESS) );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x1F8 );

__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
Posts 115 of 16 · Page 1 of 2

Post a Reply

Tags for this Thread

None

Need help?