Results 1 to 7 of 7
  1. #1
    Turbulence_'s Avatar
    Join Date
    May 2019
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0

    Red face Head and Body Position

    Mpgh.
    I'm back after great time, thanks for welcome!

    Firstly,
    Thanks for the space.
    My questions are simple for this section programmers,

    How get Head and Body position in this crossfire season?
    Maybe that the segment below is correctly for purpose...
    Code:
    MOV ECX,DWORD PTR DS:[11433ACC] // pLTModel(?)
    MOV EDX,DWORD PTR DS:[ECX]
    MOV EDX,DWORD PTR DS:[EDX+3C] 
    PUSH 1
    LEA EDI,DWORD PTR DS:[ESI+40]
    PUSH EDI                       // what is this "EDI"?
    PUSH EAX
    MOV EAX,DWORD PTR DS:[ESI+C]
    PUSH EAX
    CALL EDX
    Thanks in advanced,
    graciously see you.

  2. #2
    luizimloko's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    fs:[0]
    Posts
    1,879
    Reputation
    136
    Thanks
    10,138
    My Mood
    Yeehaw
    Code:
    #define ADDR_ILTMODEL			0x01433ACC
    
    unsigned int GetNodeTransform( int *Obj, unsigned int iNodeNumber, CTransform *pTransForm )
    {
    	char *strCShell = "CShell.dll";
    
    	__asm
    	{
    		PUSH strCShell
    		CALL DWORD PTR DS:[ GetModuleHandle ]
    		ADD EAX, ADDR_ILTMODEL
    		MOV ECX, DWORD PTR DS:[ EAX ]
    		MOV EDX, DWORD PTR DS:[ ECX ]
    		MOV EDX, DWORD PTR DS:[ EDX + 0x3C ] 
    		PUSH 1
    		PUSH pTransForm
    		PUSH iNodeNumber
    		PUSH Obj
    		CALL EDX
    	}
    
    	//PUSH 1
    	//LEA EDI,DWORD PTR DS:[ESI+40]	 // Loads the address of pTransform Object on EDI.
    	//PUSH EDI                       // EDI = pTransForm reference struct.
    	//PUSH EAX			 // EAX = iNodeNumber.
    	//MOV EAX,DWORD PTR DS:[ESI+C]	 // EAX = Rewrite the EAX with Entity's Object.
    	//PUSH EAX			 // EAX = Entity's Object.
    	//CALL EDX			 // Calls GetNodeTransform on ILTModel's class.
    }
    Last edited by luizimloko; 05-09-2019 at 07:33 PM.

  3. The Following 2 Users Say Thank You to luizimloko For This Useful Post:

    Jhem (05-15-2019),Turbulence_ (05-10-2019)

  4. #3
    Turbulence_'s Avatar
    Join Date
    May 2019
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0
    @luizimloko Thanks so much brother!!!
    But, even with this code, or with others, my drawing does not render.

    //maybe, my off's not correct? //i've tried others off's also, Me=0x1F4, Size=0xD78, Start=0x1E8.
    Code:
    //MY OFFSET'S:
    dwPlayerSize = 0xD78
    dwPlayerStart = 0x1F8
    dwMe = 0x204
    error at:
    Code:
    005E5D52  movzx       ecx,byte ptr [eax+0ACh]
    Last edited by Turbulence_; 05-10-2019 at 03:49 PM.

  5. #4
    luizimloko's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    fs:[0]
    Posts
    1,879
    Reputation
    136
    Thanks
    10,138
    My Mood
    Yeehaw
    Quote Originally Posted by Turbulence_ View Post
    @luizimloko Thanks so much brother!!!
    But, even with this code, or with others, my drawing does not render.

    //maybe, my off's not correct? //i've tried others off's also, Me=0x1F4, Size=0xD78, Start=0x1E8.
    Code:
    //MY OFFSET'S:
    dwPlayerSize = 0xD78
    dwPlayerStart = 0x1F8
    dwMe = 0x204
    error at:
    Code:
    005E5D52  movzx       ecx,byte ptr [eax+0ACh]
    Code:
    #define ADDR_LTCLIENTSHELL			0x014372E0
    #define ADDR_ILTMODEL				0x01433ACC
    
    #define OFFSET_PLAYERSIZE			0xD78
    #define OFFSET_PLAYERSTART			0x1F8
    #define OFFSET_ME				0x204
    
    CPlayer *getPlayerByIndex( DWORD dw_LTClientShell, int i )
    {
    	DWORD dw_CPlayerStart = ( dw_LTClientShell + OFFSET_PLAYERSTART );
    
    	if( !dw_CPlayerStart )
    		return nullptr;
    
    	return ( CPlayer * ) ( dw_CPlayerStart + OFFSET_PLAYERSIZE * i );
    }
    
    unsigned int getNodeTransform( int *Obj, unsigned int iNodeNumber, CTransform *pTransForm )
    {
    	char *strCShell = "CShell.dll";
    
    	__asm
    	{
    		PUSH strCShell
    		CALL DWORD PTR DS:[ GetModuleHandle ]
    		ADD EAX, ADDR_ILTMODEL
    		MOV ECX, DWORD PTR DS:[ EAX ]
    		MOV EDX, DWORD PTR DS:[ ECX ]
    		MOV EDX, DWORD PTR DS:[ EDX + 0x3C ]
    		PUSH 1
    		PUSH pTransForm
    		PUSH iNodeNumber
    		PUSH Obj
    		CALL EDX
    	}
    }
    
    const D3DXVECTOR3 getBoneVector( int *Obj, unsigned int iNodeNumber )
    {
    	CTransform objBoneTransform = CTransform( );
    	unsigned int iRet = getNodeTransform( Obj, iNodeNumber, &objBoneTransform );
    
    	return objBoneTransform.Pos;
    }
    
    const bool bIsValidPlayer( CPlayer *p )
    {
    	return ( p != 0 && p->Object != 0 &&
    	         p->CharacterFX != 0 && p->Health > 0 );
    }
    
    void playerLoop( void )
    {
    	DWORD dw_ClientFX = ( DWORD ) GetModuleHandle( "ClientFX.fxd" );
    
    	if( !dw_ClientFX )
    		return;
    
    	DWORD dw_CShell = ( DWORD ) GetModuleHandle( "CShell.dll" );
    
    	if( !dw_CShell )
    		return;
    
    	DWORD dw_LTClientShell = *( DWORD * ) ( dw_CShell + ADDR_LTCLIENTSHELL );
    
    	if( !dw_LTClientShell )
    		return;
    
    	CPlayer *pLocal = getPlayerByIndex( dw_LTClientShell, *( int * ) ( dw_LTClientShell + OFFSET_ME ) );
    
    	if( !pLocal )
    		return;
    
    	for( int i = 0; i < 16; i++ )
    	{
    		CPlayer *pPlayer = getPlayerByIndex( dw_LTClientShell, i );
    
    		if( !bIsValidPlayer( pPlayer ) )
    			continue;
    
    		D3DXVECTOR3 vHead = getBoneVector( pPlayer->Object, 8 );
    	}
    }

  6. The Following 2 Users Say Thank You to luizimloko For This Useful Post:

    Jhem (05-15-2019),Turbulence_ (05-13-2019)

  7. #5
    vaisefud3's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    951
    Reputation
    10
    Thanks
    150
    My Mood
    Bored
    Quote Originally Posted by luizimloko View Post


    Code:
    #define ADDR_LTCLIENTSHELL			0x014372E0
    #define ADDR_ILTMODEL				0x01433ACC
    
    #define OFFSET_PLAYERSIZE			0xD78
    #define OFFSET_PLAYERSTART			0x1F8
    #define OFFSET_ME				0x204
    
    CPlayer *getPlayerByIndex( DWORD dw_LTClientShell, int i )
    {
    	DWORD dw_CPlayerStart = ( dw_LTClientShell + OFFSET_PLAYERSTART );
    
    	if( !dw_CPlayerStart )
    		return nullptr;
    
    	return ( CPlayer * ) ( dw_CPlayerStart + OFFSET_PLAYERSIZE * i );
    }
    
    unsigned int getNodeTransform( int *Obj, unsigned int iNodeNumber, CTransform *pTransForm )
    {
    	char *strCShell = "CShell.dll";
    
    	__asm
    	{
    		PUSH strCShell
    		CALL DWORD PTR DS:[ GetModuleHandle ]
    		ADD EAX, ADDR_ILTMODEL
    		MOV ECX, DWORD PTR DS:[ EAX ]
    		MOV EDX, DWORD PTR DS:[ ECX ]
    		MOV EDX, DWORD PTR DS:[ EDX + 0x3C ]
    		PUSH 1
    		PUSH pTransForm
    		PUSH iNodeNumber
    		PUSH Obj
    		CALL EDX
    	}
    }
    
    const D3DXVECTOR3 getBoneVector( int *Obj, unsigned int iNodeNumber )
    {
    	CTransform objBoneTransform = CTransform( );
    	unsigned int iRet = getNodeTransform( Obj, iNodeNumber, &objBoneTransform );
    
    	return objBoneTransform.Pos;
    }
    
    const bool bIsValidPlayer( CPlayer *p )
    {
    	return ( p != 0 && p->Object != 0 &&
    	         p->CharacterFX != 0 && p->Health > 0 );
    }
    
    void playerLoop( void )
    {
    	DWORD dw_ClientFX = ( DWORD ) GetModuleHandle( "ClientFX.fxd" );
    
    	if( !dw_ClientFX )
    		return;
    
    	DWORD dw_CShell = ( DWORD ) GetModuleHandle( "CShell.dll" );
    
    	if( !dw_CShell )
    		return;
    
    	DWORD dw_LTClientShell = *( DWORD * ) ( dw_CShell + ADDR_LTCLIENTSHELL );
    
    	if( !dw_LTClientShell )
    		return;
    
    	CPlayer *pLocal = getPlayerByIndex( dw_LTClientShell, *( int * ) ( dw_LTClientShell + OFFSET_ME ) );
    
    	if( !pLocal )
    		return;
    
    	for( int i = 0; i < 16; i++ )
    	{
    		CPlayer *pPlayer = getPlayerByIndex( dw_LTClientShell, i );
    
    		if( !bIsValidPlayer( pPlayer ) )
    			continue;
    
    		D3DXVECTOR3 vHead = getBoneVector( pPlayer->Object, 8 );
    	}
    }
    If you don't want to loop through 16 players everytime (like BattleRoyale that has 50),there's an engine function that returns the max number os players.

  8. The Following User Says Thank You to vaisefud3 For This Useful Post:

    Turbulence_ (05-13-2019)

  9. #6
    Turbulence_'s Avatar
    Join Date
    May 2019
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0
    @luizimloko

    Thank so much brother!
    I'll try now, but I want learn instead of have ready codes.
    If possible you can share a little cognition about how i can find the exactly class playerinfo on reclass, i have the bypass to use reclass in cf.
    I have a imagination about this, maybe add_log("#define pPlayer 0x%X", pPlayer); and with the address generated, let's go to reclass.. (???)
    Thanks in advanced!

  10. #7
    I love myself
    나도 너를 사랑해

    Former Staff
    Premium Member
    Jhem's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Location
    167,646,447
    Posts
    5,145
    Reputation
    1220
    Thanks
    7,398
    My Mood
    Stressed
    Quote Originally Posted by luizimloko View Post


    Code:
    #define ADDR_LTCLIENTSHELL			0x014372E0
    #define ADDR_ILTMODEL				0x01433ACC
    
    #define OFFSET_PLAYERSIZE			0xD78
    #define OFFSET_PLAYERSTART			0x1F8
    #define OFFSET_ME				0x204
    
    CPlayer *getPlayerByIndex( DWORD dw_LTClientShell, int i )
    {
    	DWORD dw_CPlayerStart = ( dw_LTClientShell + OFFSET_PLAYERSTART );
    
    	if( !dw_CPlayerStart )
    		return nullptr;
    
    	return ( CPlayer * ) ( dw_CPlayerStart + OFFSET_PLAYERSIZE * i );
    }
    
    unsigned int getNodeTransform( int *Obj, unsigned int iNodeNumber, CTransform *pTransForm )
    {
    	char *strCShell = "CShell.dll";
    
    	__asm
    	{
    		PUSH strCShell
    		CALL DWORD PTR DS:[ GetModuleHandle ]
    		ADD EAX, ADDR_ILTMODEL
    		MOV ECX, DWORD PTR DS:[ EAX ]
    		MOV EDX, DWORD PTR DS:[ ECX ]
    		MOV EDX, DWORD PTR DS:[ EDX + 0x3C ]
    		PUSH 1
    		PUSH pTransForm
    		PUSH iNodeNumber
    		PUSH Obj
    		CALL EDX
    	}
    }
    
    const D3DXVECTOR3 getBoneVector( int *Obj, unsigned int iNodeNumber )
    {
    	CTransform objBoneTransform = CTransform( );
    	unsigned int iRet = getNodeTransform( Obj, iNodeNumber, &objBoneTransform );
    
    	return objBoneTransform.Pos;
    }
    
    const bool bIsValidPlayer( CPlayer *p )
    {
    	return ( p != 0 && p->Object != 0 &&
    	         p->CharacterFX != 0 && p->Health > 0 );
    }
    
    void playerLoop( void )
    {
    	DWORD dw_ClientFX = ( DWORD ) GetModuleHandle( "ClientFX.fxd" );
    
    	if( !dw_ClientFX )
    		return;
    
    	DWORD dw_CShell = ( DWORD ) GetModuleHandle( "CShell.dll" );
    
    	if( !dw_CShell )
    		return;
    
    	DWORD dw_LTClientShell = *( DWORD * ) ( dw_CShell + ADDR_LTCLIENTSHELL );
    
    	if( !dw_LTClientShell )
    		return;
    
    	CPlayer *pLocal = getPlayerByIndex( dw_LTClientShell, *( int * ) ( dw_LTClientShell + OFFSET_ME ) );
    
    	if( !pLocal )
    		return;
    
    	for( int i = 0; i < 16; i++ )
    	{
    		CPlayer *pPlayer = getPlayerByIndex( dw_LTClientShell, i );
    
    		if( !bIsValidPlayer( pPlayer ) )
    			continue;
    
    		D3DXVECTOR3 vHead = getBoneVector( pPlayer->Object, 8 );
    	}
    }
    Sweet as always,

Similar Threads

  1. I got stitches on my head, and a bald spot.
    By Jabuuty671 in forum General
    Replies: 35
    Last Post: 12-20-2010, 10:37 PM
  2. [Help] Sa_tex error and BODY skins
    By marcoshacking1 in forum Sudden Attack General
    Replies: 7
    Last Post: 06-07-2010, 11:05 AM
  3. Moderator and helper positions
    By PyrexxHero® in forum Suggestions, Requests & General Help
    Replies: 3
    Last Post: 04-13-2009, 12:28 PM
  4. need anti-kick and one position kill!!
    By gmrapno1 in forum WarRock - International Hacks
    Replies: 9
    Last Post: 05-07-2007, 12:17 PM
  5. Freee Heads And Shi
    By EleMentX in forum Entertainment
    Replies: 9
    Last Post: 07-30-2006, 03:23 PM