HelpRunConsoleCommand

Posts 15 of 5 · Page 1 of 1
RunConsoleCommand
This is thanks to flengo i got this but i still get no results in-game

RCM
Code:
void WINAPIV hkRunConsoleCommand( const char* cmd )
{
	_asm
	{
		PUSH cmd
		MOV EAX, ADDR_CONSOLEUNWRAPPED
		CALL EAX
		ADD ESP, 0x4
	}
}
Way I'm Using it..
Code:
if(engine){
		if( engine->ValidGamePointers() )
		{
			*(DWORD*)&engine->GetLTBase()->RunConsoleCommand = (DWORD)&hkRunConsoleCommand;
			hkRunConsoleCommand("+SkelModelStencil 1");}
}
Reason ??
Doesn't help me.
I just want to do the SkelModelStencil.
I found a new function that I am using now..


Code:
bool Ingame( void )
{
	if( engine )
	{
		if( engine->ValidGamePointers() )
		{
			int* MyObj = engine->GetLTBase()->GetClientObject();

			if( MyObj )
			{
				D3DXVECTOR3 MyPos = engine->MyGetObjectMaxPos( MyObj );

				if( MyPos.x == 0.0f || MyPos.y == 0.0f || MyPos.z == 0.0f )
					return false;
				else
					return true;
			}
		}
	}
	return false;
}

void ConsoleCommand(int Variable, const char *TextOn, const char *TextOff, bool& zsFlag)
{
	typedef void(__cdecl*RunConsoleCommandFn)(const char*);
	RunConsoleCommandFn RunConsoleHack = (RunConsoleCommandFn)0x3780CB90;

	if(Variable == 1 && zsFlag == false && Ingame())
	{
		RunConsoleHack(TextOn);
		zsFlag = true;
	}

	if(Variable == 0 && zsFlag == true && Ingame())
	{
		RunConsoleHack(TextOff);
		zsFlag = false;
	}
}


declarations..
int Chams = 1;
bool szFlag = false;

In Thread..

if(Ingame){
			AltConsoleCommand(Chams, "+SkelModelStencil 1", "+SkelModelStencil 0", szFlag);
		}
ValidPointer
Code:
bool cEngine::ValidGamePointers( void )
{
	if( ValidPointer( pClientShellBase )
	 && ValidPointer( pGameClientShell ) 
	 && ValidPointer( pLTModel ) 
	 && ValidPointer( pLTBase ) 
	 && ValidPointer( pLTClient )
	 && ValidPointer( pClientInfoMgr )
	 && ValidPointer( pPlayerManager ) 
	 && ValidPointer( pLocal ) )
		return true;

	return false;
}
Should be "on" at all times. But I don't see anything in-game still.
You didn't read the thread I linked you to. You're using an outdated method to run your own Console Commands.

Read the thread again. Follow the methods posted in there.
Quote Originally Posted by Flengo View Post
You didn't read the thread I linked you to. You're using an outdated method to run your own Console Commands.

Read the thread again. Follow the methods posted in there.
I read word by word from that topic and this is what i whip up at the end.

Console
Code:
void Console(const char* command, int v4){
	        static DWORD rccAdr = NULL;

	if(!rccAdr)
		rccAdr = 0x490520;
	
	typedef void(__cdecl*RunConsoleCommandFn)(const char*,int&);
	RunConsoleCommandFn RunConsoleCmd = (RunConsoleCommandFn)rccAdr;
	RunConsoleCmd(command,v4);
}
in Thread
Code:
		if( !conVars.IsUpdated() )
		{

			conVars.Init();

			return 0;
		}
		float multiplier = 3;

// speedhack
//conVars.SetConvarValue<float>( conVars._BaseMoveAccel,3000+(3000*multiplier) );
		//conVars.SetConvarValue<float>( conVars._StartAccel,500+(500*multiplier) );
		//conVars.SetConvarValue<float>( conVars._MaxAccel,3000+(3000*multiplier) );
		//conVars.SetConvarValue<float>( conVars._AccelInc,6000+(6000*multiplier) );
		conVars.SetConvarValue<float>( conVars._WalkVel,70+(70*multiplier) );
		conVars.SetConvarValue<float>( conVars._FRunVel,285+(285*multiplier) );
		conVars.SetConvarValue<float>( conVars._BRunVel,285+(285*multiplier) );
		conVars.SetConvarValue<float>( conVars._SRunVel,285+(285*multiplier) );
		conVars.SetConvarValue<float>( conVars._DuckVel,50+(50*multiplier) );
		Console("+SkelModelStencil",1);

Still don't get no result In-Game
Whats wrong with it now ???
Posts 15 of 5 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?