Results 1 to 5 of 5
  1. #1
    lunatik21's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    7

    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 ??

  2. #2
    Coder.DiasII's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Location
    In My World
    Posts
    1,511
    Reputation
    156
    Thanks
    5,756
    My Mood
    Aggressive
    • Registered - February 03, 2012
    • Contributor since August 05, 2014



    CombatArms Brasil


    PointBlank Brasil


  3. #3
    lunatik21's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    7
    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.
    Last edited by lunatik21; 06-25-2013 at 03:24 PM.

  4. #4
    Flengo's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Ontario, Canada
    Posts
    15,707
    Reputation
    3319
    Thanks
    11,128
    My Mood
    Happy
    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 All Of My PM's & VM's
    If you need help with anything, just let me know.
     
     
    VM | PM

    Publicist Since 04.04.2015
    Middleman Since Unknown - Unknown
    Global Moderator Since 08.01.2013
    Donator Since 05.29.2013

    Minion+ Since 04.18.2013

    District 187 Minion Since 04.04.2013
    Steam Minion Since 02.26.2013
    WarRock Minion Since 02.19.2013
    A.V.A Minion Since 02.13.2013
    DayZ Minion Since 01.21.2013
    Combat Arms Minion Since 12.26.2012
    Contributor Since 11.16.2012
    Member Since 05.11.2010


  5. #5
    lunatik21's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    7
    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 ???