HelpPTC?

Posts 16 of 6 · Page 1 of 1
PTC?
I am currently developing a hotkey base CA NA trainer. However, when I use this PTC:

Code:
void PushToConsole( __in const char* Command )
{
	void* Console = ( void* )0x48B650; //ADDRESS_CONSOLE_UNWRAPPED
	__asm
	{
		PUSHAD
		PUSH Command		;
		MOV EAX, Console	;
		CALL EAX		;
		ADD ESP, 0x4		;
		POPAD
	}
};

...
PushToConsole( "SkelModelStencil 1" );
Nothing happens. Can someone please help me? Thanks in advance.
Quote Originally Posted by ijikix View Post
I am currently developing a hotkey base CA NA trainer. However, when I use this PTC:

Code:
void PushToConsole( __in const char* Command )
{
	void* Console = ( void* )0x48B650; //ADDRESS_CONSOLE_UNWRAPPED
	__asm
	{
		PUSHAD
		PUSH Command		;
		MOV EAX, Console	;
		CALL EAX		;
		ADD ESP, 0x4		;
		POPAD
	}
};

...
PushToConsole( "SkelModelStencil 1" );
Nothing happens. Can someone please help me? Thanks in advance.
Dont try coding if you can't code dude....
Quote Originally Posted by ijikix View Post
I am currently developing a hotkey base CA NA trainer. However, when I use this PTC:

Code:
void PushToConsole( __in const char* Command )
{
	void* Console = ( void* )0x48B650; //ADDRESS_CONSOLE_UNWRAPPED
	__asm
	{
		PUSHAD
		PUSH Command		;
		MOV EAX, Console	;
		CALL EAX		;
		ADD ESP, 0x4		;
		POPAD
	}
};

...
PushToConsole( "SkelModelStencil 1" );
Nothing happens. Can someone please help me? Thanks in advance.
void* Console : why are you using void* for an addy??? Use DWORD*...

Code:
__asm 
	{
		Pushad; //starting
		Push Command //Pushing the command...
		call Console //... for the console
		add esp, 0x4 //adding 0x4 on the esp
		Popad; //ending
		}
	}
Try this:
typedef INT(WINAPIV *tPush)(CONST CHAR *szCommand);
tPush ExecuteConsole = (tPush)ADDR_CONSOLEUNWRAPPED; //Gellin's logger
Okay, before we fight over macros and void* addresses.
It doesn't matter really, as long as they all point to the same thing.

@OP are you using the PTC method inside of an Engine function? or through your own thread.
I think it only works within an Engine function. Also, It doesn't matter really what type of PTC you use, they both do the same thing and the delay is barely noticable ingame.

I'd also advise you to check your Address as that may be the cause of the error.
Posts 16 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?