Results 1 to 9 of 9
  1. #1
    SawMister's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Germany
    Posts
    23
    Reputation
    16
    Thanks
    0

    Question ESP is not working correctly

    Hey Infestationcoder :P
    I really need help from you.

    I have this code to draw red dots for player, and white dots for vehicles:

    Code:
    void Draw(){
    	//=======================================================================
    	//Local Player
    	//=======================================================================
    	DWORD LocalPlayerAddress;
    	D3DXVECTOR3 LocalPlayerPos;
    	LocalPlayerAddress = memory.read<DWORD>(GetGame() + LocalPlayerOffset);
    	LocalPlayerAddress ^= LocalPlayerXOR;
    	LocalPlayerPos =  memory.read<D3DXVECTOR3 >(LocalPlayerAddress + locationAddress);
    
    	//=======================================================================
    	//Objects + Zombies
    	//=======================================================================
    
    	CGameWorld gw = memory.read<CGameWorld>(GetGameWorld());
    
    	int maxObjects = gw.GetMaxObjects(); 
    
    
    	for(int x = 0; x < maxObjects; x++){
    
    		D3DCOLOR color = NULL;
    
    		DWORD objAddress = memory.read<int>(gw.GetObject(x));
    	
    		
    		D3DXVECTOR3 pvPos  = memory.read<D3DXVECTOR3 >(objAddress + locationAddress);
    		D3DXVECTOR3 pvOut;
    		if(300 >= getDistance(LocalPlayerPos, pvPos)){
    			if(World2Screen(pvPos, &pvOut)){
    				
    				if (memory.read<int>(objAddress + ObjectManagerID) == PLAYER)
    					DrawFilledBox(pvOut.x, pvOut.y, 4, 4, 204, 46, 46, 200);
    				else if  (memory.read<int>(objAddress + ObjectManagerID) == OBJTYPE_VEHICLE)
    					DrawFilledBox(pvOut.x, pvOut.y, 4, 4, 204, 255, 255, 255);
    				
    	}
    		}
    }
    Its working.
    But now, i want to draw a box instead of the FilledBox.
    So i made this:

    Code:
    void DrawPlayerBox(int x, int y, int w, int h, int borderPx, int r, int g, int b, int a) {
    	DrawFilledBox(x - (w / 2), (y - h + borderPx), w, borderPx, r, g, b, a); //bottom 
    	DrawFilledBox(x - (w / 2), (y - h + borderPx), borderPx, h, r, g, b, a); //left 
    	DrawFilledBox(x - (w / 2), y, w, borderPx, r, g, b, a); //top 
    	DrawFilledBox((x + w - borderPx) - (w / 2), (y - h + borderPx), borderPx, h, r, g, b, a);//right 
    }
    And changed the code below to:

    Code:
    void Draw(){
    	//=======================================================================
    	//Local Player
    	//=======================================================================
    	DWORD LocalPlayerAddress;
    	D3DXVECTOR3 LocalPlayerPos;
    	LocalPlayerAddress = memory.read<DWORD>(GetGame() + LocalPlayerOffset);
    	LocalPlayerAddress ^= LocalPlayerXOR;
    	LocalPlayerPos =  memory.read<D3DXVECTOR3 >(LocalPlayerAddress + locationAddress);
    
    	//=======================================================================
    	//Objects + Zombies
    	//=======================================================================
    
    	CGameWorld gw = memory.read<CGameWorld>(GetGameWorld());
    
    	int maxObjects = gw.GetMaxObjects(); 
    
    
    	for(int x = 0; x < maxObjects; x++){
    
    		D3DCOLOR color = NULL;
    
    		DWORD objAddress = memory.read<int>(gw.GetObject(x));
    	
    		
    		D3DXVECTOR3 pvPos  = memory.read<D3DXVECTOR3 >(objAddress + locationAddress);
    		D3DXVECTOR3 pvOut;
    		if(300 >= getDistance(LocalPlayerPos, pvPos)){
    			if(World2Screen(pvPos, &pvOut)){
    				
    				if (memory.read<int>(objAddress + ObjectManagerID) == PLAYER)
    					float dx = LocalPlayerPos.x - pvPos.x;
    				float dy = LocalPlayerPos.y - pvPos.y;
    				float dz = LocalPlayerPos.z - pvPos.z;
    				float DistancePlayer = (float)sqrt((dx * dx) + (dy * dy) + (dz * dz));
    				float fWidth = (60.0f * 15.0f) / DistancePlayer;
    				float fHeight = (100.0f * 15.0f) / DistancePlayer;
    				float fHeightMod = (500.0f / DistancePlayer);
    				DrawPlayerBox(pvOut.x, pvOut.y, fWidth, fHeight, 1, 0, 204, 0, 255);
    				else if  (memory.read<int>(objAddress + ObjectManagerID) == OBJTYPE_VEHICLE)
    					DrawFilledBox(pvOut.x, pvOut.y, 4, 4, 204, 255, 255, 255);
    				
    	}
    		}
    }
    But now ALL objects ingame are shown as a Box. Zombies, Player and Vehicles.
    I saw this:
    Code:
    CGameWorld gw = memory.read<CGameWorld>(GetGameWorld());
    This could be the reason why it shows me all objects, but then i dont know why the red dot only shows me the player..

    Okay. Now i have this region in code which is made ONLY for player:

    Code:
    ClientGame gc = memory.read<ClientGame>(GetGame());
    
    	for (int x = 0; x < 128; x++){
    
    		DWORD objAddress = (DWORD)gc.GetPlayerByIndex(x);
    
    		if (memory.read<int>(objAddress + ObjectManagerID) == PLAYER){
    			D3DXVECTOR3 pvPos = memory.read<D3DXVECTOR3 >(objAddress + locationAddress);
    			D3DXVECTOR3 pvOut;
    			if (World2Screen(pvPos, &pvOut)){
    
    				// Draw everything for the players here
    				
    				float dx = LocalPlayerPos.x - pvPos.x;
    				float dy = LocalPlayerPos.y - pvPos.y;
    				float dz = LocalPlayerPos.z - pvPos.z;
    				float DistancePlayer = (float)sqrt((dx * dx) + (dy * dy) + (dz * dz));
    				float fWidth = (60.0f * 15.0f) / DistancePlayer;
    				float fHeight = (100.0f * 15.0f) / DistancePlayer;
    				float fHeightMod = (500.0f / DistancePlayer);
    				DrawPlayerBox(pvOut.x, pvOut.y, fWidth, fHeight, 1, 0, 204, 0, 255);
    			}
    
    		}
    
    	}
    But if i do this, i don´t see anything, so the code isn´t working.
    What is wrong with the second code which is made for player only?
    And why do i see all objects with the PlayerBox, but only player with the red FilledBox?
    Im German, so sorry for my bad English.
    I hope you can help me
    If you want to see it (Teamviewer) add me in skype: SawMister
    Best regards, René
    Last edited by SawMister; 03-20-2014 at 12:40 PM.

  2. #2
    Jov's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Location
    $KASPA LAMBO
    Posts
    4,526
    Reputation
    4549
    Thanks
    17,413
    Nice! If you want you can checkout my post with Chams and D3D that may help




    THE EYES OF THE DAVESTAPO ARE UPON YOU. ANY WRONG YOU DO WE ARE GONNA SEE, WHEN YOU'RE ON MPGH, LOOK BEHIND YOU, 'CAUSE THATS WHERE WE GONNA BE




  3. #3
    SawMister's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Germany
    Posts
    23
    Reputation
    16
    Thanks
    0
    No it´s not nice its a problem
    I would love you if you can tell me what is wrong in the second code, because i don´t need chams :P
    Regards, SawMister

  4. #4
    Jov's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Location
    $KASPA LAMBO
    Posts
    4,526
    Reputation
    4549
    Thanks
    17,413
    Well, i usually work with chams and CE maybe @ForeverRed or @TokolocoSK
    Can help you




    THE EYES OF THE DAVESTAPO ARE UPON YOU. ANY WRONG YOU DO WE ARE GONNA SEE, WHEN YOU'RE ON MPGH, LOOK BEHIND YOU, 'CAUSE THATS WHERE WE GONNA BE




  5. #5
    SawMister's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Germany
    Posts
    23
    Reputation
    16
    Thanks
    0
    I hope they see this
    Regards, René

  6. #6
    TokolocoSK's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Comendo Peru Pato Frango Búrguer.
    Posts
    2,874
    Reputation
    65
    Thanks
    6,858
    My Mood
    Yeehaw
    I have no idea what you are wanting to do ...



  7. #7
    SawMister's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Germany
    Posts
    23
    Reputation
    16
    Thanks
    0
    //================================================== =====================
    //Players
    //================================================== =====================


    ClientGame gc = memory.read<ClientGame>(GetGame());

    for (int x = 0; x < 128; x++){

    DWORD objAddress = (DWORD)gc.GetPlayerByIndex(x);

    if (memory.read<int>(objAddress + ObjectManagerID) == PLAYER){
    D3DXVECTOR3 pvPos = memory.read<D3DXVECTOR3 >(objAddress + locationAddress);
    D3DXVECTOR3 pvOut;
    if (World2Screen(pvPos, &pvOut)){

    //Draw everything for the players here
    float dx = LocalPlayerPos.x - pvPos.x;
    float dy = LocalPlayerPos.y - pvPos.y;
    float dz = LocalPlayerPos.z - pvPos.z;
    float DistancePlayer = (float)sqrt((dx * dx) + (dy * dy) + (dz * dz));
    float fWidth = (60.0f * 15.0f) / DistancePlayer;
    float fHeight = (100.0f * 15.0f) / DistancePlayer;
    float fHeightMod = (500.0f / DistancePlayer);
    DrawPlayerBox(pvOut.x, pvOut.y, fWidth, fHeight, 1, 0, 204, 0, 255);
    }

    }

    }
    This code should work. Whats wrong with it?
    It doesn´t show me players

  8. #8
    TokolocoSK's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Comendo Peru Pato Frango Búrguer.
    Posts
    2,874
    Reputation
    65
    Thanks
    6,858
    My Mood
    Yeehaw
    Quote Originally Posted by SawMister View Post
    This code should work. Whats wrong with it?
    It doesn´t show me players
    for (int x = 0; x < 128; x++)

    128 is ?



  9. #9
    SawMister's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Germany
    Posts
    23
    Reputation
    16
    Thanks
    0
    Its the max user value on a server. This class is outdated but should work. Whats the new maximum player value on a server?
    But i think this will not fix the problem :S

Similar Threads

  1. NEW ESP HACK NOT RELEASE
    By xkostasx7 in forum Call of Duty Modern Warfare 2 Help
    Replies: 3
    Last Post: 12-02-2009, 02:12 PM
  2. [Help] injector not workin
    By loonylezzy in forum CrossFire Hacks & Cheats
    Replies: 12
    Last Post: 10-24-2009, 12:22 PM
  3. public hack not workin proply
    By lamont in forum CrossFire Hacks & Cheats
    Replies: 0
    Last Post: 07-16-2009, 06:28 PM
  4. crossfire hacks gettin not workin QQ
    By retard223 in forum CrossFire Hacks & Cheats
    Replies: 17
    Last Post: 06-03-2009, 08:09 PM
  5. Make It Clear For CA Not Workin!
    By DurangoSan in forum Combat Arms Hacks & Cheats
    Replies: 19
    Last Post: 05-31-2009, 11:41 AM