THREAD: Aimbot Source Code C#
  1. 11-18-2013, 05:23 AM
    PowerPC's Avatar
    PowerPC
    Guest
    PowerPC's Avatar
    PowerPC
    Guest
    n/a
    Posts
    n/a
    Reputation
    Once upon a time...
    NextGenUpdate
    I see everyone want a aimbot well here a source code for one :p

    vec3 myOrigin;
    char AttackerTeam;
    vec3 refOrigin;
    vec3 testOrigin;

    #pragma region Aimbot

    vec3 myOrigin;
    char AttackerTeam;
    vec3 refOrigin;
    vec3 testOrigin;

    vec3 vectoangles(float value1, float value2, float value3)
    {
    float forward;
    float yaw, pitch;
    vec3 angles;
    if (value1 == 0 && value2 == 0)
    {
    yaw = 0;
    if (value3 > 0) pitch = 90.00;
    else pitch = 270.00;
    }
    else
    {
    if (value1 != -1) yaw = (float)(atan2((double)value2, (double)value1) * 180.00 / PI);
    else if (value2 > 0) yaw = 90.00;
    else yaw = 270;
    if (yaw < 0) yaw += 360.00;

    forward = (float)sqrt((double)(value1 * value1 + value2 * value2));
    pitch = (float)(atan2((double)value3, (double)forward) * 180.00 / PI);
    if (pitch < 0) pitch += 360.00;
    }
    angles.angles[0] = -pitch;
    angles.angles[1] = yaw;
    angles.angles[2] = 0;

    return angles;
    }

    vec3 getOrigin(int client)
    {
    vec3 origin;
    origin.angles[0] = mw3Playerstate[client]->x;
    origin.angles[1] = mw3Playerstate[client]->y;
    origin.angles[2] = mw3Playerstate[client]->z;
    return origin;
    }

    bool closer(vec3 myOrigin, vec3 referenceOrigin, vec3 newOrigin)
    {
    float onex = myOrigin.angles[0] - referenceOrigin.angles[0];
    float twox = myOrigin.angles[1] - referenceOrigin.angles[1];
    float threex = myOrigin.angles[2] - referenceOrigin.angles[2];
    double orig = (onex * onex) + (twox * twox) + (threex + threex);
    float myx = myOrigin.angles[0] - newOrigin.angles[0];
    float myx2 = myOrigin.angles[1] - newOrigin.angles[1];
    float myxx = myOrigin.angles[2] - newOrigin.angles[2];
    double newo = (myx * myx) + (myx2 * myx2) + (myxx + myxx);

    if (newo < orig)
    return true;
    else
    return false;
    }

    void setAngles(int client, float pitch, float yaw, float roll)
    {
    SetViewAngle setViewAngles = (SetViewAngle)0x8222FC90;
    float angles[] = { pitch, yaw, roll };
    setViewAngles(mw3Entity[client], angles);
    }

    void aimAtNearestClient(int attacker)
    {
    myOrigin = getOrigin(attacker);
    AttackerTeam = mw3Playerstate[attacker]->team;
    for(int i=0; i<3; i++) refOrigin.angles = 99999999.00;
    int numAlivePlayers = 0;
    for (int i = 0; i < 18; i++)
    {
    if (mw3Entity->active == (char)1)
    {
    //printf("aimbot client %i active\n", i);
    if (Verified == false && i != attacker)
    {
    //printf("client %i is not attacker\n", i);
    if (checkTeam(i, AttackerTeam))
    {
    //printf("client %i is not on attackers team\n", i);
    if (mw3Entity->alive != (char)4)
    {
    //printf("client %i is alive\n", i);
    numAlivePlayers++;
    testOrigin = getOrigin(i);
    if (closer(myOrigin, refOrigin, testOrigin))
    {
    //printf("client %i is the closest\n", i);
    refOrigin = testOrigin;
    }
    }
    }
    }
    }
    }
    if (numAlivePlayers > 0)
    {
    vec3 test = vectoangles(refOrigin.angles[0] - myOrigin.angles[0], refOrigin.angles[1] - myOrigin.angles[1], refOrigin.angles[2] - myOrigin.angles[2]);
    //printf("target found, setting client view angles to %f, %f, %f", test.angles[0], test.angles[1], test.angles[2]);
    setAngles(attacker, test.angles[0], test.angles[1], test.angles[2]);
    }
    }

    #pragma endregion All aimbot functions (mw3)

    #pragma region Aimbot

    vec3 getOriginBo2(int client)
    {
    vec3 origin;
    origin.angles[0] = bo2Playerstate[client]->x;
    origin.angles[1] = bo2Playerstate[client]->y;
    origin.angles[2] = bo2Playerstate[client]->z;
    return origin;
    }

    bool checkTeamBo2(int client, int attackerTeam)
    {
    if (attackerTeam == 0) return true;
    int team = (int)bo2Playerstate[client]->team;
    if (attackerTeam != team) return true;
    else return false;
    }

    void setAnglesBo2(int client, float pitch, float yaw, float roll)
    {
    float angles[] = { pitch, yaw, roll };
    setViewAnglesBo2(bo2Entity[client], angles);
    }

    singleuchar *getClientStance(int client)
    {
    return (singleuchar*)(bo2PlayerstateInt(client) + 0xff);
    }

    bool targetFound = false;
    void aimAtNearestClientBo2(int attacker)
    {
    targetFound = false;
    myOrigin = getOriginBo2(attacker);
    AttackerTeam = bo2Playerstate[attacker]->team;
    for(int i=0; i<3; i++) refOrigin.angles = -99999999.00;
    int numAlivePlayers = 0;
    int closestInt = 0;
    for (int i = 0; i < 18; i++)
    {
    if (bo2Entity->active == 0x04)
    {
    if (bo2Playerstate->verificationLevel != 0x01 && i != attacker)
    {
    if (checkTeamBo2(i, AttackerTeam))
    {
    if (bo2Entity->alive != 0x04)
    {
    numAlivePlayers++;
    testOrigin = getOriginBo2(i);
    if (closer(myOrigin, refOrigin, testOrigin))
    {
    refOrigin = testOrigin;
    targetFound = true;
    closestInt = i;
    }
    }
    }
    }
    }
    }
    if (numAlivePlayers > 0 && targetFound)
    {
    refOrigin = getOriginBo2(closestInt);
    myOrigin = getOriginBo2(attacker);
    unsigned char stance = getClientStance(closestInt)->character;
    if(stance == 0x04 || stance == 0x06 || stance == 0x44)
    refOrigin.angles[2] -= 14.00; //crouch
    else if(stance == 0x08 || stance == 0x0a || stance == 0x4Cool Man (aka Tustin)
    refOrigin.angles[2] -= 44.00; //prone
    vec3 test = vectoangles(refOrigin.angles[0] - myOrigin.angles[0], refOrigin.angles[1] - myOrigin.angles[1], refOrigin.angles[2] - myOrigin.angles[2]);
    setAnglesBo2(attacker, test.angles[0], test.angles[1], test.angles[2]);
    }
    }


    Ones for mw3 and the other is for bo2

    you will have to map it out and use the right function for it.
  2. The Following 8 Users Say Thank You to PowerPC For This Useful Post:

    , , , , , ,

  3. The Following 7 Users Groaned At PowerPC For This Awful Post:

    , , , ,

  4. 11-18-2013, 05:22 PM
    Sticky's Avatar
    Sticky
    Mary J Wannnnna
    Sticky's Avatar
    Sticky
    Mary J Wannnnna
    574
    Posts
    16,961
    Reputation
    Mar 2013
    NextGenUpdate
    Why dont you release the whole source Winky Winky
  5. 11-18-2013, 08:14 PM
    John's Avatar
    John
    skid
    John's Avatar
    John
    skid
    1,822
    Posts
    65,774
    Reputation
    Dec 2012
    NextGenUpdate
    Originally Posted by PowerPC View Post
    I see everyone want a aimbot well here a source code for one :p

    vec3 myOrigin;
    char AttackerTeam;
    vec3 refOrigin;
    vec3 testOrigin;

    #pragma region Aimbot

    vec3 myOrigin;
    char AttackerTeam;
    vec3 refOrigin;
    vec3 testOrigin;

    vec3 vectoangles(float value1, float value2, float value3)
    {
    float forward;
    float yaw, pitch;
    vec3 angles;
    if (value1 == 0 && value2 == 0)
    {
    yaw = 0;
    if (value3 > 0) pitch = 90.00;
    else pitch = 270.00;
    }
    else
    {
    if (value1 != -1) yaw = (float)(atan2((double)value2, (double)value1) * 180.00 / PI);
    else if (value2 > 0) yaw = 90.00;
    else yaw = 270;
    if (yaw < 0) yaw += 360.00;

    forward = (float)sqrt((double)(value1 * value1 + value2 * value2));
    pitch = (float)(atan2((double)value3, (double)forward) * 180.00 / PI);
    if (pitch < 0) pitch += 360.00;
    }
    angles.angles[0] = -pitch;
    angles.angles[1] = yaw;
    angles.angles[2] = 0;

    return angles;
    }

    vec3 getOrigin(int client)
    {
    vec3 origin;
    origin.angles[0] = mw3Playerstate[client]->x;
    origin.angles[1] = mw3Playerstate[client]->y;
    origin.angles[2] = mw3Playerstate[client]->z;
    return origin;
    }

    bool closer(vec3 myOrigin, vec3 referenceOrigin, vec3 newOrigin)
    {
    float onex = myOrigin.angles[0] - referenceOrigin.angles[0];
    float twox = myOrigin.angles[1] - referenceOrigin.angles[1];
    float threex = myOrigin.angles[2] - referenceOrigin.angles[2];
    double orig = (onex * onex) + (twox * twox) + (threex + threex);
    float myx = myOrigin.angles[0] - newOrigin.angles[0];
    float myx2 = myOrigin.angles[1] - newOrigin.angles[1];
    float myxx = myOrigin.angles[2] - newOrigin.angles[2];
    double newo = (myx * myx) + (myx2 * myx2) + (myxx + myxx);

    if (newo < orig)
    return true;
    else
    return false;
    }

    void setAngles(int client, float pitch, float yaw, float roll)
    {
    SetViewAngle setViewAngles = (SetViewAngle)0x8222FC90;
    float angles[] = { pitch, yaw, roll };
    setViewAngles(mw3Entity[client], angles);
    }

    void aimAtNearestClient(int attacker)
    {
    myOrigin = getOrigin(attacker);
    AttackerTeam = mw3Playerstate[attacker]->team;
    for(int i=0; i<3; i++) refOrigin.angles = 99999999.00;
    int numAlivePlayers = 0;
    for (int i = 0; i < 18; i++)
    {
    if (mw3Entity->active == (char)1)
    {
    //printf("aimbot client %i active\n", i);
    if (Verified == false && i != attacker)
    {
    //printf("client %i is not attacker\n", i);
    if (checkTeam(i, AttackerTeam))
    {
    //printf("client %i is not on attackers team\n", i);
    if (mw3Entity->alive != (char)4)
    {
    //printf("client %i is alive\n", i);
    numAlivePlayers++;
    testOrigin = getOrigin(i);
    if (closer(myOrigin, refOrigin, testOrigin))
    {
    //printf("client %i is the closest\n", i);
    refOrigin = testOrigin;
    }
    }
    }
    }
    }
    }
    if (numAlivePlayers > 0)
    {
    vec3 test = vectoangles(refOrigin.angles[0] - myOrigin.angles[0], refOrigin.angles[1] - myOrigin.angles[1], refOrigin.angles[2] - myOrigin.angles[2]);
    //printf("target found, setting client view angles to %f, %f, %f", test.angles[0], test.angles[1], test.angles[2]);
    setAngles(attacker, test.angles[0], test.angles[1], test.angles[2]);
    }
    }

    #pragma endregion All aimbot functions (mw3)

    #pragma region Aimbot

    vec3 getOriginBo2(int client)
    {
    vec3 origin;
    origin.angles[0] = bo2Playerstate[client]->x;
    origin.angles[1] = bo2Playerstate[client]->y;
    origin.angles[2] = bo2Playerstate[client]->z;
    return origin;
    }

    bool checkTeamBo2(int client, int attackerTeam)
    {
    if (attackerTeam == 0) return true;
    int team = (int)bo2Playerstate[client]->team;
    if (attackerTeam != team) return true;
    else return false;
    }

    void setAnglesBo2(int client, float pitch, float yaw, float roll)
    {
    float angles[] = { pitch, yaw, roll };
    setViewAnglesBo2(bo2Entity[client], angles);
    }

    singleuchar *getClientStance(int client)
    {
    return (singleuchar*)(bo2PlayerstateInt(client) + 0xff);
    }

    bool targetFound = false;
    void aimAtNearestClientBo2(int attacker)
    {
    targetFound = false;
    myOrigin = getOriginBo2(attacker);
    AttackerTeam = bo2Playerstate[attacker]->team;
    for(int i=0; i<3; i++) refOrigin.angles = -99999999.00;
    int numAlivePlayers = 0;
    int closestInt = 0;
    for (int i = 0; i < 18; i++)
    {
    if (bo2Entity->active == 0x04)
    {
    if (bo2Playerstate->verificationLevel != 0x01 && i != attacker)
    {
    if (checkTeamBo2(i, AttackerTeam))
    {
    if (bo2Entity->alive != 0x04)
    {
    numAlivePlayers++;
    testOrigin = getOriginBo2(i);
    if (closer(myOrigin, refOrigin, testOrigin))
    {
    refOrigin = testOrigin;
    targetFound = true;
    closestInt = i;
    }
    }
    }
    }
    }
    }
    if (numAlivePlayers > 0 && targetFound)
    {
    refOrigin = getOriginBo2(closestInt);
    myOrigin = getOriginBo2(attacker);
    unsigned char stance = getClientStance(closestInt)->character;
    if(stance == 0x04 || stance == 0x06 || stance == 0x44)
    refOrigin.angles[2] -= 14.00; //crouch
    else if(stance == 0x08 || stance == 0x0a || stance == 0x4Cool Man (aka Tustin)
    refOrigin.angles[2] -= 44.00; //prone
    vec3 test = vectoangles(refOrigin.angles[0] - myOrigin.angles[0], refOrigin.angles[1] - myOrigin.angles[1], refOrigin.angles[2] - myOrigin.angles[2]);
    setAnglesBo2(attacker, test.angles[0], test.angles[1], test.angles[2]);
    }
    }


    Ones for mw3 and the other is for bo2

    you will have to map it out and use the right function for it.

    i love you if this works <3
  6. 11-18-2013, 10:29 PM
    Eddie Mac's Avatar
    Eddie Mac
    At least I can fight
    Eddie Mac's Avatar
    Eddie Mac
    At least I can fight
    2,088
    Posts
    43,299
    Reputation
    Feb 2011
    NextGenUpdate
    Originally Posted by PowerPC View Post
    I see everyone want a aimbot well here a source code for one :p

    vec3 myOrigin;
    char AttackerTeam;
    vec3 refOrigin;
    vec3 testOrigin;

    #pragma region Aimbot

    vec3 myOrigin;
    char AttackerTeam;
    vec3 refOrigin;
    vec3 testOrigin;

    vec3 vectoangles(float value1, float value2, float value3)
    {
    float forward;
    float yaw, pitch;
    vec3 angles;
    if (value1 == 0 && value2 == 0)
    {
    yaw = 0;
    if (value3 > 0) pitch = 90.00;
    else pitch = 270.00;
    }
    else
    {
    if (value1 != -1) yaw = (float)(atan2((double)value2, (double)value1) * 180.00 / PI);
    else if (value2 > 0) yaw = 90.00;
    else yaw = 270;
    if (yaw < 0) yaw += 360.00;

    forward = (float)sqrt((double)(value1 * value1 + value2 * value2));
    pitch = (float)(atan2((double)value3, (double)forward) * 180.00 / PI);
    if (pitch < 0) pitch += 360.00;
    }
    angles.angles[0] = -pitch;
    angles.angles[1] = yaw;
    angles.angles[2] = 0;

    return angles;
    }

    vec3 getOrigin(int client)
    {
    vec3 origin;
    origin.angles[0] = mw3Playerstate[client]->x;
    origin.angles[1] = mw3Playerstate[client]->y;
    origin.angles[2] = mw3Playerstate[client]->z;
    return origin;
    }

    bool closer(vec3 myOrigin, vec3 referenceOrigin, vec3 newOrigin)
    {
    float onex = myOrigin.angles[0] - referenceOrigin.angles[0];
    float twox = myOrigin.angles[1] - referenceOrigin.angles[1];
    float threex = myOrigin.angles[2] - referenceOrigin.angles[2];
    double orig = (onex * onex) + (twox * twox) + (threex + threex);
    float myx = myOrigin.angles[0] - newOrigin.angles[0];
    float myx2 = myOrigin.angles[1] - newOrigin.angles[1];
    float myxx = myOrigin.angles[2] - newOrigin.angles[2];
    double newo = (myx * myx) + (myx2 * myx2) + (myxx + myxx);

    if (newo < orig)
    return true;
    else
    return false;
    }

    void setAngles(int client, float pitch, float yaw, float roll)
    {
    SetViewAngle setViewAngles = (SetViewAngle)0x8222FC90;
    float angles[] = { pitch, yaw, roll };
    setViewAngles(mw3Entity[client], angles);
    }

    void aimAtNearestClient(int attacker)
    {
    myOrigin = getOrigin(attacker);
    AttackerTeam = mw3Playerstate[attacker]->team;
    for(int i=0; i<3; i++) refOrigin.angles = 99999999.00;
    int numAlivePlayers = 0;
    for (int i = 0; i < 18; i++)
    {
    if (mw3Entity->active == (char)1)
    {
    //printf("aimbot client %i active\n", i);
    if (Verified == false && i != attacker)
    {
    //printf("client %i is not attacker\n", i);
    if (checkTeam(i, AttackerTeam))
    {
    //printf("client %i is not on attackers team\n", i);
    if (mw3Entity->alive != (char)4)
    {
    //printf("client %i is alive\n", i);
    numAlivePlayers++;
    testOrigin = getOrigin(i);
    if (closer(myOrigin, refOrigin, testOrigin))
    {
    //printf("client %i is the closest\n", i);
    refOrigin = testOrigin;
    }
    }
    }
    }
    }
    }
    if (numAlivePlayers > 0)
    {
    vec3 test = vectoangles(refOrigin.angles[0] - myOrigin.angles[0], refOrigin.angles[1] - myOrigin.angles[1], refOrigin.angles[2] - myOrigin.angles[2]);
    //printf("target found, setting client view angles to %f, %f, %f", test.angles[0], test.angles[1], test.angles[2]);
    setAngles(attacker, test.angles[0], test.angles[1], test.angles[2]);
    }
    }

    #pragma endregion All aimbot functions (mw3)

    #pragma region Aimbot

    vec3 getOriginBo2(int client)
    {
    vec3 origin;
    origin.angles[0] = bo2Playerstate[client]->x;
    origin.angles[1] = bo2Playerstate[client]->y;
    origin.angles[2] = bo2Playerstate[client]->z;
    return origin;
    }

    bool checkTeamBo2(int client, int attackerTeam)
    {
    if (attackerTeam == 0) return true;
    int team = (int)bo2Playerstate[client]->team;
    if (attackerTeam != team) return true;
    else return false;
    }

    void setAnglesBo2(int client, float pitch, float yaw, float roll)
    {
    float angles[] = { pitch, yaw, roll };
    setViewAnglesBo2(bo2Entity[client], angles);
    }

    singleuchar *getClientStance(int client)
    {
    return (singleuchar*)(bo2PlayerstateInt(client) + 0xff);
    }

    bool targetFound = false;
    void aimAtNearestClientBo2(int attacker)
    {
    targetFound = false;
    myOrigin = getOriginBo2(attacker);
    AttackerTeam = bo2Playerstate[attacker]->team;
    for(int i=0; i<3; i++) refOrigin.angles = -99999999.00;
    int numAlivePlayers = 0;
    int closestInt = 0;
    for (int i = 0; i < 18; i++)
    {
    if (bo2Entity->active == 0x04)
    {
    if (bo2Playerstate->verificationLevel != 0x01 && i != attacker)
    {
    if (checkTeamBo2(i, AttackerTeam))
    {
    if (bo2Entity->alive != 0x04)
    {
    numAlivePlayers++;
    testOrigin = getOriginBo2(i);
    if (closer(myOrigin, refOrigin, testOrigin))
    {
    refOrigin = testOrigin;
    targetFound = true;
    closestInt = i;
    }
    }
    }
    }
    }
    }
    if (numAlivePlayers > 0 && targetFound)
    {
    refOrigin = getOriginBo2(closestInt);
    myOrigin = getOriginBo2(attacker);
    unsigned char stance = getClientStance(closestInt)->character;
    if(stance == 0x04 || stance == 0x06 || stance == 0x44)
    refOrigin.angles[2] -= 14.00; //crouch
    else if(stance == 0x08 || stance == 0x0a || stance == 0x4Cool Man (aka Tustin)
    refOrigin.angles[2] -= 44.00; //prone
    vec3 test = vectoangles(refOrigin.angles[0] - myOrigin.angles[0], refOrigin.angles[1] - myOrigin.angles[1], refOrigin.angles[2] - myOrigin.angles[2]);
    setAnglesBo2(attacker, test.angles[0], test.angles[1], test.angles[2]);
    }
    }


    Ones for mw3 and the other is for bo2

    you will have to map it out and use the right function for it.


    Might want to add in your thread that these are for XBOX. Not sure if it will work on PS3 but I guess it will if you change the offset/addresses.
  7. The Following User Thanked Eddie Mac For This Useful Post:


  8. 11-19-2013, 05:00 AM
    kiwi_modz's Avatar
    kiwi_modz
    I defeated!
    kiwi_modz's Avatar
    kiwi_modz
    I defeated!
    627
    Posts
    15,825
    Reputation
    Jul 2013
    NextGenUpdate
    Originally Posted by eddie View Post
    Might want to add in your thread that these are for XBOX. Not sure if it will work on PS3 but I guess it will if you change the offset/addresses.


    hahaha i was thinking the same shit when i saw this lel.

    and yes. FM|T ported Xbox's addressees and offsets to ps3 so it is possible, if you know how to port that stuff xD

    so funny how the usual people thank/write posts to this thinking its the "real deal" SMH haha
  9. The Following 2 Users Say Thank You to kiwi_modz For This Useful Post:

    ,

  10. 11-19-2013, 07:11 AM
    Eddie Mac's Avatar
    Eddie Mac
    At least I can fight
    Eddie Mac's Avatar
    Eddie Mac
    At least I can fight
    2,088
    Posts
    43,299
    Reputation
    Feb 2011
    NextGenUpdate
    Originally Posted by kiwi View Post
    hahaha i was thinking the same shit when i saw this lel.

    and yes. FM|T ported Xbox's addressees and offsets to ps3 so it is possible, if you know how to port that stuff xD

    so funny how the usual people thank/write posts to this thinking its the "real deal" SMH haha


    lol exactly. And the only reason I thanked this is because at least he is trying to help. But I feel bad for the people who think that this code is for PS3 and try to slap it in a program and fail.
  11. 11-19-2013, 12:14 PM
    Sticky's Avatar
    Sticky
    Mary J Wannnnna
    Sticky's Avatar
    Sticky
    Mary J Wannnnna
    574
    Posts
    16,961
    Reputation
    Mar 2013
    NextGenUpdate
    Originally Posted by eddie View Post
    lol exactly. And the only reason I thanked this is because at least he is trying to help. But I feel bad for the people who think that this code is for PS3 and try to slap it in a program and fail.


    Also its for C++ not C# lawl
  12. The Following User Thanked Sticky For This Useful Post:


  13. 11-19-2013, 10:47 PM
    21
    Posts
    32
    Reputation
    Oct 2013
    NextGenUpdate
    Originally Posted by StickyNGU View Post
    Also its for C++ not C# lawl


    like you know how to make a aimbot lol
  14. 11-19-2013, 11:08 PM
    Red-EyeX32's Avatar
    Red-EyeX32
    Former Staff
    Red-EyeX32's Avatar
    Red-EyeX32
    Former Staff
    1,476
    Posts
    82,530
    Reputation
    Dec 2011
    NextGenUpdate
    Originally Posted by PowerPC View Post
    I see everyone want a aimbot well here a source code for one :p

    vec3 myOrigin;
    char AttackerTeam;
    vec3 refOrigin;
    vec3 testOrigin;

    #pragma region Aimbot

    vec3 myOrigin;
    char AttackerTeam;
    vec3 refOrigin;
    vec3 testOrigin;

    vec3 vectoangles(float value1, float value2, float value3)
    {
    float forward;
    float yaw, pitch;
    vec3 angles;
    if (value1 == 0 && value2 == 0)
    {
    yaw = 0;
    if (value3 > 0) pitch = 90.00;
    else pitch = 270.00;
    }
    else
    {
    if (value1 != -1) yaw = (float)(atan2((double)value2, (double)value1) * 180.00 / PI);
    else if (value2 > 0) yaw = 90.00;
    else yaw = 270;
    if (yaw < 0) yaw += 360.00;

    forward = (float)sqrt((double)(value1 * value1 + value2 * value2));
    pitch = (float)(atan2((double)value3, (double)forward) * 180.00 / PI);
    if (pitch < 0) pitch += 360.00;
    }
    angles.angles[0] = -pitch;
    angles.angles[1] = yaw;
    angles.angles[2] = 0;

    return angles;
    }

    vec3 getOrigin(int client)
    {
    vec3 origin;
    origin.angles[0] = mw3Playerstate[client]->x;
    origin.angles[1] = mw3Playerstate[client]->y;
    origin.angles[2] = mw3Playerstate[client]->z;
    return origin;
    }

    bool closer(vec3 myOrigin, vec3 referenceOrigin, vec3 newOrigin)
    {
    float onex = myOrigin.angles[0] - referenceOrigin.angles[0];
    float twox = myOrigin.angles[1] - referenceOrigin.angles[1];
    float threex = myOrigin.angles[2] - referenceOrigin.angles[2];
    double orig = (onex * onex) + (twox * twox) + (threex + threex);
    float myx = myOrigin.angles[0] - newOrigin.angles[0];
    float myx2 = myOrigin.angles[1] - newOrigin.angles[1];
    float myxx = myOrigin.angles[2] - newOrigin.angles[2];
    double newo = (myx * myx) + (myx2 * myx2) + (myxx + myxx);

    if (newo < orig)
    return true;
    else
    return false;
    }

    void setAngles(int client, float pitch, float yaw, float roll)
    {
    SetViewAngle setViewAngles = (SetViewAngle)0x8222FC90;
    float angles[] = { pitch, yaw, roll };
    setViewAngles(mw3Entity[client], angles);
    }

    void aimAtNearestClient(int attacker)
    {
    myOrigin = getOrigin(attacker);
    AttackerTeam = mw3Playerstate[attacker]->team;
    for(int i=0; i<3; i++) refOrigin.angles = 99999999.00;
    int numAlivePlayers = 0;
    for (int i = 0; i < 18; i++)
    {
    if (mw3Entity->active == (char)1)
    {
    //printf("aimbot client %i active\n", i);
    if (Verified == false && i != attacker)
    {
    //printf("client %i is not attacker\n", i);
    if (checkTeam(i, AttackerTeam))
    {
    //printf("client %i is not on attackers team\n", i);
    if (mw3Entity->alive != (char)4)
    {
    //printf("client %i is alive\n", i);
    numAlivePlayers++;
    testOrigin = getOrigin(i);
    if (closer(myOrigin, refOrigin, testOrigin))
    {
    //printf("client %i is the closest\n", i);
    refOrigin = testOrigin;
    }
    }
    }
    }
    }
    }
    if (numAlivePlayers > 0)
    {
    vec3 test = vectoangles(refOrigin.angles[0] - myOrigin.angles[0], refOrigin.angles[1] - myOrigin.angles[1], refOrigin.angles[2] - myOrigin.angles[2]);
    //printf("target found, setting client view angles to %f, %f, %f", test.angles[0], test.angles[1], test.angles[2]);
    setAngles(attacker, test.angles[0], test.angles[1], test.angles[2]);
    }
    }

    #pragma endregion All aimbot functions (mw3)

    #pragma region Aimbot

    vec3 getOriginBo2(int client)
    {
    vec3 origin;
    origin.angles[0] = bo2Playerstate[client]->x;
    origin.angles[1] = bo2Playerstate[client]->y;
    origin.angles[2] = bo2Playerstate[client]->z;
    return origin;
    }

    bool checkTeamBo2(int client, int attackerTeam)
    {
    if (attackerTeam == 0) return true;
    int team = (int)bo2Playerstate[client]->team;
    if (attackerTeam != team) return true;
    else return false;
    }

    void setAnglesBo2(int client, float pitch, float yaw, float roll)
    {
    float angles[] = { pitch, yaw, roll };
    setViewAnglesBo2(bo2Entity[client], angles);
    }

    singleuchar *getClientStance(int client)
    {
    return (singleuchar*)(bo2PlayerstateInt(client) + 0xff);
    }

    bool targetFound = false;
    void aimAtNearestClientBo2(int attacker)
    {
    targetFound = false;
    myOrigin = getOriginBo2(attacker);
    AttackerTeam = bo2Playerstate[attacker]->team;
    for(int i=0; i<3; i++) refOrigin.angles = -99999999.00;
    int numAlivePlayers = 0;
    int closestInt = 0;
    for (int i = 0; i < 18; i++)
    {
    if (bo2Entity->active == 0x04)
    {
    if (bo2Playerstate->verificationLevel != 0x01 && i != attacker)
    {
    if (checkTeamBo2(i, AttackerTeam))
    {
    if (bo2Entity->alive != 0x04)
    {
    numAlivePlayers++;
    testOrigin = getOriginBo2(i);
    if (closer(myOrigin, refOrigin, testOrigin))
    {
    refOrigin = testOrigin;
    targetFound = true;
    closestInt = i;
    }
    }
    }
    }
    }
    }
    if (numAlivePlayers > 0 && targetFound)
    {
    refOrigin = getOriginBo2(closestInt);
    myOrigin = getOriginBo2(attacker);
    unsigned char stance = getClientStance(closestInt)->character;
    if(stance == 0x04 || stance == 0x06 || stance == 0x44)
    refOrigin.angles[2] -= 14.00; //crouch
    else if(stance == 0x08 || stance == 0x0a || stance == 0x4Cool Man (aka Tustin)
    refOrigin.angles[2] -= 44.00; //prone
    vec3 test = vectoangles(refOrigin.angles[0] - myOrigin.angles[0], refOrigin.angles[1] - myOrigin.angles[1], refOrigin.angles[2] - myOrigin.angles[2]);
    setAnglesBo2(attacker, test.angles[0], test.angles[1], test.angles[2]);
    }
    }


    Ones for mw3 and the other is for bo2

    you will have to map it out and use the right function for it.


    First let me tell you, this isn't C# it's C++. If you call yourself PowerPC you should know the difference, obviously not Not Happy or Sad
  15. The Following 4 Users Say Thank You to Red-EyeX32 For This Useful Post:

    , ,

  16. 11-20-2013, 12:44 AM
    Sticky's Avatar
    Sticky
    Mary J Wannnnna
    Sticky's Avatar
    Sticky
    Mary J Wannnnna
    574
    Posts
    16,961
    Reputation
    Mar 2013
    NextGenUpdate
    Originally Posted by TheGuySleeps View Post
    like you know how to make a aimbot lol


    :ROFL: I made a post on how to make an aimbot before any of you noobs even thought about it