HelpPTC comands don't working

Posts 1–15 of 21 · Page 1 of 2
PTC comands don't working
In my hack don't work any PTC commands what do?
Quote Originally Posted by GoldWhite View Post
In my hack don't work any PTC commands what do?
post your code here, i'll try and help if i can
Quote Originally Posted by merp. View Post
post your code here, i'll try and help if i can
#include "Main.h"
#include "xor.h"
#include "xstrings.h"

void __cdecl RunConsoleCommand( const char* cCommand )
{
void* address = ( void* )0x00485D30; //Unwrapped Console Address
__asm
{
Push cCommand
call address
add esp, 0x4
}
}
bool IsInGame()
{
switch(*(int*)0x37863E24) //Game Status Address
{
case 1:
return true; //Your in a game
case 5:
return false; //Your in the lobby
}
return false; //Even if you aren't
}
void main( void )
{
while ( true )
{
if ( IsInGame() /*In-Game*/ && GetAsyncKeyState( VK_NUMPAD1 ) < 0 /*Self Explanitory*/ )
{
RunConsoleCommand( "SkelModelStencil 1" ); //On
}else{
RunConsoleCommand( "SkelModelStencil 0" ); //Off
}
}
}
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL &&
GetModuleHandleA( "ClientFX.fxd" ) != NULL &&
GetModuleHandleA( "CShell.dll" ) != NULL )
return true;

return false;
}
DWORD WINAPI dwHackThread( LPVOID )
{
while ( !IsGameReadyForHook() )
Sleep( 25 );
main();

return EXIT_SUCCESS;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls( hDll );
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread( NULL, NULL, dwHackThread, NULL, NULL, NULL );
}
return TRUE;
}


#include "Main.h"
#include "xor.h"
#include "xstrings.h"

void __cdecl RunConsoleCommand( const char* cCommand )
{
void* address = ( void* )0x00485D30; //Unwrapped Console Address
__asm
{
Push cCommand
MOV EAX, 0x00485D30
call
EAX
add esp, 0x4
}
}
bool IsInGame()
{
switch(*(int*)0x37863E24) //Game Status Address
{
case 1:
return true; //Your in a game
case 5:
return false; //Your in the lobby
}
return false; //Even if you aren't
}
void main( void )
{
while ( true )
{
if ( IsInGame() /*In-Game*/ && GetAsyncKeyState( VK_NUMPAD1 ) < 0 /*Self Explanitory*/ )
{
RunConsoleCommand( "SkelModelStencil 1" ); //On
}else{
RunConsoleCommand( "SkelModelStencil 0" ); //Off
}
}
}
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL &&
GetModuleHandleA( "ClientFX.fxd" ) != NULL &&
GetModuleHandleA( "CShell.dll" ) != NULL )
return true;

return false;
}
DWORD WINAPI dwHackThread( LPVOID )
{
while ( !IsGameReadyForHook() )
Sleep( 25 );
main();

return EXIT_SUCCESS;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls( hDll );
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread( NULL, NULL, dwHackThread, NULL, NULL, NULL );
}
return TRUE;
}


Maybe thats the problem?
might be different for CARU though
sorry for not using code tags, they were spazzing out
Unwrapped Console and Game Status addresses are old, update them
Quote Originally Posted by rails View Post
Unwrapped Console and Game Status addresses are old, update them
Adresses are for CARU
I'm sorry for my previous post and quick assumption, your addresses might be correct but I don't have CARU and I don't know how different it is to know if it works on that as well. That code works for me after changing the addresses to my version ones though

I just installed CARU, maybe I'm missing something but I can send PTC commands fine with what you provided on it as well.
You need to hook an function located in engine.exe, cshell.dll or d3d9.dll so the noobcheck of engine for returnaddress fails and you can use it at all.
As example hook present.
You cant move a pointer in c++ to registers -.-
MOV EAX, 0x00485D30
You need to define a DWORD for it.
Quote Originally Posted by Ch40zz-C0d3r View Post
You cant move a pointer in c++ to registers -.-
MOV EAX, 0x00485D30
You need to define a DWORD for it.
wel yeah it was on the spot didnt think of that

where i put the red text instead of putting the address
put
MOV EAX, dwConsoleUnwrapped
Oh and remove the isingame check from where your commands are, it causes lag when you have so many.
Quote Originally Posted by TrixtSam View Post
Oh and remove the isingame check from where your commands are, it causes lag when you have so many.
How can a IF instruction lagg? lol
Checking the GameStatus, every millisecond, in an infinite loop. It can cause lag lol. It's best to just put the check inside the PTC Function and WriteOpCode.. or w,e it's called in your base.
Quote Originally Posted by TrixtSam View Post
Checking the GameStatus, every millisecond, in an infinite loop. It can cause lag lol. It's best to just put the check inside the PTC Function and WriteOpCode.. or w,e it's called in your base.
Its actually every 25ms

But the if statement wont cause lag it'll just be the fact that its being called every frame. Either way, he has to what Ch40zz said in his first post.
Quote Originally Posted by Flengo View Post


Its actually every 25ms

But the if statement wont cause lag it'll just be the fact that its being called every frame. Either way, he has to what Ch40zz said in his first post.
Allways makes my stuff lag when I used it..>.>
Posts 1–15 of 21 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us