Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    124

    how to use object?

    in the player class of CA it has a object pointer in it for the position. how do i use it to get the position?

  2. #2
    ++PashaAmd++'s Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    229
    Reputation
    11
    Thanks
    37
    learn C++?

    think about it.

  3. #3
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,863
    Reputation
    425
    Thanks
    8,598
    Code:
    class c_object
    {
    public:
    			char unknown0[4]; 
    	D3DXVECTOR3 MaxRootPosition; //0x0004  
    	D3DXVECTOR3 MinRootPosition; //0x0010  
    			char unknown28[120];
            //DWORD ObjectColorRGBA; 
    	BYTE ObjectColorR;			 //0x0094  
    	BYTE ObjectColorG;			 //0x0095  
    	BYTE ObjectColorB;			 //0x0096  
    	BYTE ObjectColorA;			 //0x0097 
    			char unknown152[4]; 
    	float ObjectScaleX;			 //0x009C  
    	float ObjectScaleY;			 //0x00A0  
    	float ObjectScaleZ;			 //0x00A4  
    			char unknown168[16]; 
    	float xPlayerUnit;			 //0x00B8  
    	float yPlayerUnit;			 //0x00BC  
    	float zPlayerUnit;			 //0x00C0  
    	float PlayerUnitWidth;		 //0x00C4
    	D3DXVECTOR3 RootPosition;	 //0x00C8  
    			char unknown212[4];
    	float Pitch;				 //0x00D8  
    	float Yaw;					 //0x00DC  
    	float Roll;					 //0x00E0  
    };
    
    	D3DXVECTOR3 MyGetObjectMaxPos( int* obj )
    	{
    		return *(D3DXVECTOR3*)( obj + 0x4 );
    	}
    
    	D3DXVECTOR3 MyGetObjectMinPos( int* obj )
    	{
    		return *(D3DXVECTOR3*)( obj + 0x10 );
    	}
    
    	D3DXVECTOR3 MyGetObjectRootPos( int* obj )
    	{
    		return *(D3DXVECTOR3*)( obj + 0xC8 );
    	}
    
    	DWORD MyGetObjectColorRGBA( int* obj )
    	{
    		return *(DWORD*)( obj + 0x94 );
    	}
    
    	void MySetObjectColorRGBA( int* obj, DWORD dwColorRGBA )
    	{
    		*(DWORD*)( obj + 0x94 ) = dwColorRGBA;
    	}
    Credits: -GHOSTER-

  4. The Following 5 Users Say Thank You to NOOB For This Useful Post:

    [MPGH]AVGN (06-30-2011),DeadLinez (06-30-2011),kibbles18 (06-30-2011),koral13579 (07-01-2011),qwerty01 (08-30-2011)

  5. #4
    DeadLinez's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    http://mpgh.net Sexy Points: 989,576,420
    Posts
    465
    Reputation
    11
    Thanks
    499
    My Mood
    Psychedelic
    Quote Originally Posted by kibbles18 View Post
    in the player class of CA it has a object pointer in it for the position. how do i use it to get the position?
    Post the class i will seeee

  6. #5
    Crash Override's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    16
    Reputation
    8
    Thanks
    1
    Quote Originally Posted by kibbles18 View Post
    in the player class of CA it has a object pointer in it for the position. how do i use it to get the position?
    DIRECT3DVECTOR9 <-- Don't have it memorized :s
    ^^^^^^^^^^^^
    jjajjajaja

  7. #6
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,863
    Reputation
    425
    Thanks
    8,598
    Quote Originally Posted by Crash Override View Post
    DIRECT3DVECTOR9 <-- Don't have it memorized :s
    ^^^^^^^^^^^^
    jjajjajaja
    D3DXVECTOR3. YUNO.

  8. #7
    Crash Override's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    16
    Reputation
    8
    Thanks
    1
    Quote Originally Posted by NOOB View Post


    D3DXVECTOR3. YUNO.
    affffffffffffffff

    X = 3D

  9. #8
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    839
    Reputation
    44
    Thanks
    400
    My Mood
    Twisted
    Close this.
    If u ddint understand till now:

    return the object as vector(d3dxvector3) and u have position...

    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
    http://www.youtube.com/watch?v=EMSB1GbBVl8

    And for sure my 8 months old gameplay with 2 friends
    http://www.youtube.com/watch?v=Na2kUdu4d_k

  10. #9
    mmbob's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    ja
    Posts
    655
    Reputation
    70
    Thanks
    1,156
    My Mood
    Bitchy
    use LTVector.

  11. #10
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    839
    Reputation
    44
    Thanks
    400
    My Mood
    Twisted
    Quote Originally Posted by mmbob View Post
    use LTVector.
    Hey can u help me updating an addy?

    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
    http://www.youtube.com/watch?v=EMSB1GbBVl8

    And for sure my 8 months old gameplay with 2 friends
    http://www.youtube.com/watch?v=Na2kUdu4d_k

  12. #11
    justiniscool5's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    idk
    Posts
    884
    Reputation
    -12
    Thanks
    182
    My Mood
    Bitchy
    @Ch40zz-C0d3r i can help u wats ur msn?

  13. #12
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    124
    so basically i cast it as any struct containing members float x,y,z

    dont flame me because i didnt know. just because i didnt know what one member of a class was used for i dont know c++ at all?
    Last edited by kibbles18; 06-30-2011 at 01:28 PM.

  14. #13
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    839
    Reputation
    44
    Thanks
    400
    My Mood
    Twisted
    Lol look at gellins base and u should know and dont need to ask here

  15. #14
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    124
    @NOOB can i use that class to set my player's camera (yaw, pitch, roll)?

  16. #15
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,889
    Reputation
    163
    Thanks
    3,289
    My Mood
    Sleepy
    Quote Originally Posted by kibbles18 View Post
    @NOOB can i use that class to set my player's camera (yaw, pitch, roll)?
    no .

Page 1 of 2 12 LastLast