In my hack don't work any PTC commands what do?
#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;
}
Unwrapped Console and Game Status addresses are old, update them
Last edited by rails; 01-07-2013 at 02:53 AM.
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.
Last edited by rails; 01-07-2013 at 05:04 AM.
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.
Progress with my game - "Disbanded"
- Fixed FPS lag on spawning entities due to the ent_preload buffer!
- Edit the AI code to get some better pathfinding
- Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
- Added a new silencer for ALL weapons. Also fixed the rotation bugs
- Added a ton of new weapons and the choice to choose a silencer for every weapon
- Created a simple AntiCheat, noobs will cry like hell xD
- The name will be Disbanded, the alpha starts on the 18th august 2014
Some new physics fun (Serversided, works on every client)
My new AI
https://www.youtube.com/watch?v=EMSB1GbBVl8
And for sure my 8 months old gameplay with 2 friends
https://www.youtube.com/watch?v=Na2kUdu4d_k
#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
Last edited by -Bl00d-; 01-07-2013 at 08:38 PM.
Successful buys: 20
Successful sells: 4
Successful trades: 9
Scammed: 4
^^^^^^^^^^^
vouche for me?
GoldWhite (01-08-2013)
You cant move a pointer in c++ to registers -.-
MOV EAX, 0x00485D30
You need to define a DWORD for it.
Progress with my game - "Disbanded"
- Fixed FPS lag on spawning entities due to the ent_preload buffer!
- Edit the AI code to get some better pathfinding
- Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
- Added a new silencer for ALL weapons. Also fixed the rotation bugs
- Added a ton of new weapons and the choice to choose a silencer for every weapon
- Created a simple AntiCheat, noobs will cry like hell xD
- The name will be Disbanded, the alpha starts on the 18th august 2014
Some new physics fun (Serversided, works on every client)
My new AI
https://www.youtube.com/watch?v=EMSB1GbBVl8
And for sure my 8 months old gameplay with 2 friends
https://www.youtube.com/watch?v=Na2kUdu4d_k
[MPGH]Flengo (01-08-2013)
Oh and remove the isingame check from where your commands are, it causes lag when you have so many.
Progress with my game - "Disbanded"
- Fixed FPS lag on spawning entities due to the ent_preload buffer!
- Edit the AI code to get some better pathfinding
- Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
- Added a new silencer for ALL weapons. Also fixed the rotation bugs
- Added a ton of new weapons and the choice to choose a silencer for every weapon
- Created a simple AntiCheat, noobs will cry like hell xD
- The name will be Disbanded, the alpha starts on the 18th august 2014
Some new physics fun (Serversided, works on every client)
My new AI
https://www.youtube.com/watch?v=EMSB1GbBVl8
And for sure my 8 months old gameplay with 2 friends
https://www.youtube.com/watch?v=Na2kUdu4d_k
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.
I Read All Of My PM's & VM'sIf you need help with anything, just let me know.
Staff Administrator Since 10.13.2019
Publicist Since 04.04.2015
Middleman Since 04.14.2014
Global Moderator Since 08.01.2013
Premium Since 05.29.2013
Minion+ Since 04.18.2013
Combat Arms Minion Since 12.26.2012
Contributor Since 11.16.2012
Member Since 05.11.2010