Results 1 to 14 of 14
  1. #1
    jayjay153's Avatar
    Join Date
    Jan 2018
    Gender
    female
    Posts
    294
    Reputation
    10
    Thanks
    113

    Aimbot with FOV 15° [without client error 30_0]

    Code:
    float GetDistance(float Xx, float Yy, float xX, float yY)
    {
        return sqrt((yY - Yy) * (yY - Yy) + (xX - Xx) * (xX - Xx));
    }
    
    int cAimbot::GetNearestByCrossHair(LPDIRECT3DDEVICE9 pDevice)
    {
        DWORD CShell = (DWORD)GetModuleHandleA(eCShell);
        int iAimAt = -1;
        float MaxDistance = 0xFFFFFFF;
    
        D3DVIEWPORT9 viewP;
        pDevice->GetViewport(&viewP);
        float ScreenX = viewP.Width / 2;
        float ScreenY = viewP.Height / 2;
    
        DWORD pLTClientShell = *(DWORD*)(aLTClientShell);
        if (pLTClientShell != NULL)
        {
            CPlayer* Me = GetPlayerByIndex(pLTClientShell, Engine->GetMyIndex(pLTClientShell));
    
            for (int i = 0; i < 16; i++)
            {
                CPlayer* pPlayer = GetPlayerByIndex(pLTClientShell, i);
                D3DXVECTOR3 pos = Engine->GetBonePosition(pPlayer->Object, 6);
    
                if (!Engine->isValidClient(pPlayer) && Me != pPlayer) continue;
                if (Engine->IsTM(Me, pPlayer)) continue;
    
                if (Engine->WorldToScreen(pDevice, &pos))
                {           
                    float radiusx = (3*5.0f) * (ScreenX / 100.0f);
                    float radiusy = (3*5.0f) * (ScreenY / 100.0f);
                
                    float Tmp = GetDistance(pos.x, pos.y, ScreenX, ScreenY);
        
                    //if in fov
                    if (pos.x >= ScreenX - radiusx && pos.x <= ScreenX + radiusx && pos.y >= ScreenY - radiusy && pos.y <= ScreenY + radiusy)
                    {
                        if (Tmp < MaxDistance)
                        {
                            MaxDistance = Tmp;
                            iAimAt = i;
                        }
                    }
    
                }
            }
        }
        return iAimAt;
    }
    
    then use mouse_event :D
    Credit(s) : N7

    Last edited by jayjay153; 05-20-2018 at 11:05 PM.

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

    abyan (05-22-2018),gaerGAERHGaerherh (05-21-2018),vaisefud3 (05-21-2018)

  3. #2
    gaerGAERHGaerherh's Avatar
    Join Date
    Oct 2017
    Gender
    male
    Posts
    242
    Reputation
    10
    Thanks
    141
    Thanks good job

  4. The Following User Says Thank You to gaerGAERHGaerherh For This Useful Post:

    jayjay153 (05-21-2018)

  5. #3
    M4Z3's Avatar
    Join Date
    Mar 2018
    Gender
    male
    Location
    Brazil
    Posts
    94
    Reputation
    10
    Thanks
    150
    Quote Originally Posted by jayjay153 View Post
    Code:
    float GetDistance(float Xx, float Yy, float xX, float yY)
    {
        return sqrt((yY - Yy) * (yY - Yy) + (xX - Xx) * (xX - Xx));
    }
    
    int cAimbot::GetNearestByCrossHair(LPDIRECT3DDEVICE9 pDevice)
    {
        DWORD CShell = (DWORD)GetModuleHandleA(eCShell);
        int iAimAt = -1;
        float MaxDistance = 0xFFFFFFF;
    
        D3DVIEWPORT9 viewP;
        pDevice->GetViewport(&viewP);
        float ScreenX = viewP.Width / 2;
        float ScreenY = viewP.Height / 2;
    
        DWORD pLTClientShell = *(DWORD*)(aLTClientShell);
        if (pLTClientShell != NULL)
        {
            CPlayer* Me = GetPlayerByIndex(pLTClientShell, Engine->GetMyIndex(pLTClientShell));
    
            for (int i = 0; i < 16; i++)
            {
                CPlayer* pPlayer = GetPlayerByIndex(pLTClientShell, i);
                D3DXVECTOR3 pos = Engine->GetBonePosition(pPlayer->Object, 6);
    
                if (!Engine->isValidClient(pPlayer) && Me != pPlayer) continue;
                if (Engine->IsTM(Me, pPlayer)) continue;
    
                if (Engine->WorldToScreen(pDevice, &pos))
                {           
                    float radiusx = (3*5.0f) * (ScreenX / 100.0f);
                    float radiusy = (3*5.0f) * (ScreenY / 100.0f);
                
                    float Tmp = GetDistance(pos.x, pos.y, ScreenX, ScreenY);
        
                    //if in fov
                    if (pos.x >= ScreenX - radiusx && pos.x <= ScreenX + radiusx && pos.y >= ScreenY - radiusy && pos.y <= ScreenY + radiusy)
                    {
                        if (Tmp < MaxDistance)
                        {
                            MaxDistance = Tmp;
                            iAimAt = i;
                        }
                    }
    
                }
            }
        }
        return iAimAt;
    }
    
    then use mouse_event :D
    Credit(s) : N7

    How to use in MOUSE EVENT ?
    It all depends on how much ...

    Last Version CF Hack

  6. #4
    jayjay153's Avatar
    Join Date
    Jan 2018
    Gender
    female
    Posts
    294
    Reputation
    10
    Thanks
    113
    Quote Originally Posted by M4Z3 View Post
    How to use in MOUSE EVENT ?
    Do some research.

  7. #5
    I2espect's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Location
    On Other Planet
    Posts
    641
    Reputation
    28
    Thanks
    870
    My Mood
    Devilish
    Quote Originally Posted by M4Z3 View Post
    How to use in MOUSE EVENT ?
    same as changing yaw/pitch variables (this aims without changing mouse position)
    mouse_event will move ur mouse to aim position

    but yaw/pitch method is far better

  8. #6
    vaisefud3's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    955
    Reputation
    10
    Thanks
    150
    My Mood
    Bored
    Quote Originally Posted by I2espect View Post
    same as changing yaw/pitch variables (this aims without changing mouse position)
    mouse_event will move ur mouse to aim position

    but yaw/pitch method is far better
    Actually, the mouse event he's talking about in the main post, is the mouse click (correct me if I'm wrong).

  9. #7
    M4Z3's Avatar
    Join Date
    Mar 2018
    Gender
    male
    Location
    Brazil
    Posts
    94
    Reputation
    10
    Thanks
    150
    Quote Originally Posted by vaisefud3 View Post
    Actually, the mouse event he's talking about in the main post, is the mouse click (correct me if I'm wrong).
    Pitch and Yaw = 360
    mouse_event = no 360
    It all depends on how much ...

    Last Version CF Hack

  10. #8
    I2espect's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Location
    On Other Planet
    Posts
    641
    Reputation
    28
    Thanks
    870
    My Mood
    Devilish
    Quote Originally Posted by vaisefud3 View Post
    Actually, the mouse event he's talking about in the main post, is the mouse click (correct me if I'm wrong).
    no dont think so .. he didnt check for crosshair target (trigger) .. he is getting the best target index..
    u can use mouse_event for aimbot !


    Quote Originally Posted by M4Z3 View Post
    Pitch and Yaw = 360
    mouse_event = no 360
    u are right if u are talking about closest distance target
    but he is getting closest to crosshair and look at this condition :
    he wont get anyone not visible on the screen at the moment anyway
    Code:
    if (Engine->WorldToScreen(pDevice, &pos))

  11. #9
    vaisefud3's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    955
    Reputation
    10
    Thanks
    150
    My Mood
    Bored
    Quote Originally Posted by M4Z3 View Post
    Pitch and Yaw = 360
    mouse_event = no 360
    Nop, wrong. I have pitch/yaw aimbot with anti 360.

  12. #10
    I2espect's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Location
    On Other Planet
    Posts
    641
    Reputation
    28
    Thanks
    870
    My Mood
    Devilish
    Quote Originally Posted by vaisefud3 View Post
    Nop, wrong. I have pitch/yaw aimbot with anti 360.
    he means that u ( can ) look at enemy behind u with changing yaw/pitch
    but with mouse u can't move the mouse outside of ur screen to rotate 360 !!

  13. #11
    vaisefud3's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    955
    Reputation
    10
    Thanks
    150
    My Mood
    Bored
    Quote Originally Posted by I2espect View Post
    he means that u ( can ) look at enemy behind u with changing yaw/pitch
    but with mouse u can't move the mouse outside of ur screen to rotate 360 !!
    If you use yaw and pitch to aim behind you'll receive an error. I think he is talking about the 360 the player makes
    when the aimbot is triggered. Anyhow, there's no point in keep arguing.
    Press thanks if I helped

    Xigncode Security:


  14. #12
    jayjay153's Avatar
    Join Date
    Jan 2018
    Gender
    female
    Posts
    294
    Reputation
    10
    Thanks
    113
    Quote Originally Posted by I2espect View Post
    same as changing yaw/pitch variables (this aims without changing mouse position)
    mouse_event will move ur mouse to aim position

    but yaw/pitch method is far better
    using yaw and pitch giving me an error 30_0
    so i use MouseEvent
    works perfect

    - - - Updated - - -

    Quote Originally Posted by vaisefud3 View Post
    Actually, the mouse event he's talking about in the main post, is the mouse click (correct me if I'm wrong).
    yes.
    but Im using Mouse Event to move your mouse pointer into aim position target.
    Using Pitch & Yaw gives me error 30_0

  15. #13
    I2espect's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Location
    On Other Planet
    Posts
    641
    Reputation
    28
    Thanks
    870
    My Mood
    Devilish
    @vaisefud3 @jayjay153

    anyway quick suggestion to the client_error ,, try not change it > 90~120 degree at a time
    something like this : (not tested)
    i think 0.5 is fine as it will be called in endscene anyway cuz u need max 4 frames.. won't be noticeable
    Code:
    if ( abs(newYaw-oldYaw) > (PI*0.5) ) {
    			if ((newYaw - oldYaw) < 0) {
    				*(float*)(CPLAYER + yawOffset) -= (PI*0.5);
    			}
    			else {
    				*(float*)(CPLAYER + yawOffset) += (PI*0.5);
    			}
    		}
    		else {
    			*(float*)(CPLAYER + yawOffset) = newYaw;
    		}

  16. #14
    jayjay153's Avatar
    Join Date
    Jan 2018
    Gender
    female
    Posts
    294
    Reputation
    10
    Thanks
    113
    This code is for aim sensitivity ?
    To avoid quick aim

    Ahhh ok. I have the idea.

Similar Threads

  1. [Help Request] Any ALternative On Pitch &YAW aimbot .. its giving Client Error 30_0
    By r0dspunk in forum Crossfire Coding Help & Discussion
    Replies: 4
    Last Post: 12-04-2017, 05:53 PM
  2. [Release] Fast knife without client error
    By thedemons in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 21
    Last Post: 11-14-2016, 09:26 PM
  3. [Help Request] Client Error 30_0
    By _Mike92 in forum Crossfire Coding Help & Discussion
    Replies: 5
    Last Post: 02-18-2016, 03:46 PM
  4. [Help Request] Client Error 30_0
    By CrazyFrost in forum Crossfire Coding Help & Discussion
    Replies: 26
    Last Post: 02-19-2013, 02:44 AM
  5. [Help] How to giltch without client error
    By Scoreless8 in forum CrossFire Glitches
    Replies: 6
    Last Post: 09-02-2012, 09:28 PM