Thread: Aimbot

Results 1 to 15 of 15
  1. #1
    ғᴜᴋᴏᴊʀ's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    1,557
    Reputation
    87
    Thanks
    141
    My Mood
    Inspired

    Aimbot

    So currently I'm working on my aimbot right, and I am thinking about using something like this as my main angle calculating function:

    Code:
    void MakeAngle(int DiffX, int DiffY, &Angle)
    Now I need some code so I use after that

    tan(x) = DiffX/DiffY (Or whichever is Opp and Adj i don't really wanna take the time to think about that shit now.

    So my question is how do I go from the tangent of x, to just x = ????. Would I just do the atan of it? So like

    Angle = atan(DiffX/DiffY)


    [IMG]https://i186.photobucke*****m/albums/x253/Rypleys/MNC/biohazard2.jpg[/IMG]

    MPGH in 5 words:

    Quote Originally Posted by ZEROProJect View Post
    1 in a million community

  2. #2
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Code:
    #define PI  (3.1415927f)
    #define RAD (PI / 180.0f)
    
    void getyawpitch(const vec &from, const vec &to, float &yaw, float &pitch)
    {
    	float dist = from.dist(to);
    	yaw = -(float)atan2(to.x-from.x, to.y-from.y)/PI*180+180;
    	pitch = asin((to.z-from.z)/dist)/RAD;
    }
    Thats assaultcube's aimbot code, use d3dxvectors instead of vec
    Ah we-a blaze the fyah, make it bun dem!

  3. #3
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,006
    Reputation
    202
    Thanks
    2,944
    My Mood
    Twisted
    Quote Originally Posted by -TwEaK View Post
    So currently I'm working on my aimbot right, and I am thinking about using something like this as my main angle calculating function:

    Code:
    void MakeAngle(int DiffX, int DiffY, &Angle)
    Now I need some code so I use after that

    tan(x) = DiffX/DiffY (Or whichever is Opp and Adj i don't really wanna take the time to think about that shit now.

    So my question is how do I go from the tangent of x, to just x = ????. Would I just do the atan of it? So like

    Angle = atan(DiffX/DiffY)
    Code:
    #define pi = 3.141592653
    Code:
    void MakeAngle(int DiffX, int DiffY, &Angle)
    {
    int radians = Angle * pi / 180
    int oTan = DiffY/DiffX
    oTan(Angle) = Result
    }
    I guess do something like that.. I know thats not 100% but should give you an idea
    Last edited by CAFlames; 02-27-2011 at 05:45 AM.

    Current Works:
    ---Horror Game





    [IMG]https://i645.photobucke*****m/albums/uu180/drgnforce9/Siggys/signature3.jpg[/IMG]
    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  4. #4
    lateef15's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Greensboro, North Carolina, United States
    Posts
    409
    Reputation
    8
    Thanks
    16
    Quote Originally Posted by CAFlames View Post


    Code:
    #define pi = 3.141592653
    Code:
    void MakeAngle(int DiffX, int DiffY, &Angle)
    {
    int radians = Angle * pi / 180
    int oTan = DiffY/DiffX
    oTan(Angle) = Result
    }
    I guess do something like that.. I know thats not 100% but should give you an idea
    What about if you like change the 180 to 90 so it will look more legit




    YOU MAD BRO ??
    I BET!

    [img]https://www.danasof*****m/sig/YO490753.jpg[/img]

  5. #5
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,006
    Reputation
    202
    Thanks
    2,944
    My Mood
    Twisted
    Quote Originally Posted by lateer15 View Post
    What about if you like change the 180 to 90 so it will look more legit
    Really noob? Learn c++. the 180 is for converting Degrees it radians.

    Current Works:
    ---Horror Game





    [IMG]https://i645.photobucke*****m/albums/uu180/drgnforce9/Siggys/signature3.jpg[/IMG]
    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  6. #6
    Zack's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    The Wonderful World of MPGH.
    Posts
    4,922
    Reputation
    26
    Thanks
    799
    My Mood
    Psychedelic
    Quote Originally Posted by CAFlames View Post


    Really noob? Learn c++. the 180 is for converting Degrees it radians.
    LMAO!!

  7. #7
    ғᴜᴋᴏᴊʀ's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    1,557
    Reputation
    87
    Thanks
    141
    My Mood
    Inspired
    Quote Originally Posted by CAFlames View Post


    Really noob? Learn c++. the 180 is for converting Degrees it radians.
    More like learn math. Bitch please I'm 13 and even i know what that does. Thanks flames Ur the best.

  8. The Following User Says Thank You to ғᴜᴋᴏᴊʀ For This Useful Post:

    CAFlames (02-28-2011)

  9. #8
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    If you change 180 to 90 you must change change the define of pi to (3.141592653/2)

    Degrees / 180 * Pi = Radians
    Radians / Pi * 180 = degrees
    Ah we-a blaze the fyah, make it bun dem!

  10. #9
    ғᴜᴋᴏᴊʀ's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    1,557
    Reputation
    87
    Thanks
    141
    My Mood
    Inspired
    Wouldn't you define pi as pi*2 not pi/2?

  11. #10
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Quote Originally Posted by -TwEaK View Post
    Wouldn't you define pi as pi*2 not pi/2?
    full circle = 2*pi = 360 degrees
    half circle = pi = 180 degrees
    1/4th circle = 0,5 * pi(or pi/2 if you wish) = 90 degrees
    Ah we-a blaze the fyah, make it bun dem!

  12. #11
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,006
    Reputation
    202
    Thanks
    2,944
    My Mood
    Twisted
    Quote Originally Posted by Hell_Demon View Post
    If you change 180 to 90 you must change change the define of pi to (3.141592653/2)

    Degrees / 180 * Pi = Radians
    Radians / Pi * 180 = degrees
    Now why would you bother doin that in the first place XD.
    Ahhh I hate Calculus ~.~


    Quote Originally Posted by -TwEaK View Post
    Wouldn't you define pi as pi*2 not pi/2?
    Nope. Imagine X * pi / 180.

    Dividing by 180 is like multiplying by 1 over 180. So if you change 1 over 180 to 1 over 90... thats like changing it to 2 over 180.

    So you are actually multiplying it by 2 by changing 180 to 90. In turn, you must then divide by 2 to get back to original.

    Current Works:
    ---Horror Game





    [IMG]https://i645.photobucke*****m/albums/uu180/drgnforce9/Siggys/signature3.jpg[/IMG]
    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  13. #12
    ғᴜᴋᴏᴊʀ's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    1,557
    Reputation
    87
    Thanks
    141
    My Mood
    Inspired
    Quote Originally Posted by CAFlames View Post


    Now why would you bother doin that in the first place XD.
    Ahhh I hate Calculus ~.~



    Nope. Imagine X * pi / 180.

    Dividing by 180 is like multiplying by 1 over 180. So if you change 1 over 180 to 1 over 90... thats like changing it to 2 over 180.

    So you are actually multiplying it by 2 by changing 180 to 90. In turn, you must then divide by 2 to get back to original.


    Fuck you flames you lost me on X jajajajajajajajajajajajajaja

  14. #13
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Quote Originally Posted by -TwEaK View Post


    Fuck you flames you lost me on X jajajajajajajajajajajajajaja
    X would be the angle in degrees that you want converted to radians
    Ah we-a blaze the fyah, make it bun dem!

  15. #14
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,006
    Reputation
    202
    Thanks
    2,944
    My Mood
    Twisted
    Quote Originally Posted by -TwEaK View Post


    Fuck you flames you lost me on X jajajajajajajajajajajajajaja
    ugh... so if X * pi / 180 is converting X to raidans.... then if you want to use pi / 2, it would be mutlipling denomenator from 90 to 180... thus making it correct. to multiply pi by 2 and divide by 90 instead of 180, you are actually going to get an answer 4 times the actual result.

    Quote Originally Posted by Hell_Demon View Post
    X would be the angle in degrees that you want converted to radians
    Yupperz

    Current Works:
    ---Horror Game





    [IMG]https://i645.photobucke*****m/albums/uu180/drgnforce9/Siggys/signature3.jpg[/IMG]
    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  16. #15
    ғᴜᴋᴏᴊʀ's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    1,557
    Reputation
    87
    Thanks
    141
    My Mood
    Inspired
    Quote Originally Posted by Hell_Demon View Post
    X would be the angle in degrees that you want converted to radians
    I got that part Wesley. OK Flames I get it, I wasn't planning on changing it anyways so...


    [IMG]https://i186.photobucke*****m/albums/x253/Rypleys/MNC/biohazard2.jpg[/IMG]

    MPGH in 5 words:

    Quote Originally Posted by ZEROProJect View Post
    1 in a million community