Results 1 to 4 of 4
  1. #1
    dugindog's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    jasper mn
    Posts
    189
    Reputation
    7
    Thanks
    7
    My Mood
    Twisted

    could this work???

    if i could try to get this to work do you think it migh be a working pub???
    {void SetCrosshairOnEnemy(BYTE PlayerNumber);
    {
    PLAYER_DATA oP = GetPlayerData(PlayerNumber);
    PLAYER_DATA cP = GetMyPlayerData();

    double EWdif;
    double NSdif;
    double UDdif;

    double angleA;
    double angleP;
    double angleB;
    double angleBP;

    double newValue;
    DWORD newValue2;

    double newValueb;
    DWORD newValueb2;

    double halfCircle = 0xFFFFFFFF/2;

    /*Sec 1*/
    if(oP.coordEW > cP.coordEW && oP.coordNS <= cP.coordNS)
    {
    EWdif = oP.coordEW - cP.coordEW;
    NSdif = cP.coordNS - oP.coordNS;
    angleA = atan(NSdif/EWdif) * 57.29578;
    angleP = (angleA/360);
    newValue = 0xFFFFFFFF - (0xFFFFFFFF*angleP);
    newValue2 = newValue;
    Poke((void*)cP.lookXa, &newValue2,4);
    }

    /*Sec 2*/
    if(oP.coordEW <= cP.coordEW && oP.coordNS < cP.coordNS)
    {
    EWdif = cP.coordEW - oP.coordEW;
    NSdif = cP.coordNS - oP.coordNS;
    angleA = atan(NSdif/EWdif) * 57.29578;
    angleP = (angleA/360);
    newValue = halfCircle + (0xFFFFFFFF*angleP);
    newValue2 = newValue;
    Poke((void*)cP.lookXa, &newValue2,4);
    }

    /*Sec 3*/
    if(oP.coordEW < cP.coordEW && oP.coordNS >= cP.coordNS)
    {
    EWdif = cP.coordEW - oP.coordEW;
    NSdif = oP.coordNS - cP.coordNS;
    angleA = atan(NSdif/EWdif) * 57.29578;
    angleP = (angleA/360);
    newValue = halfCircle - (0xFFFFFFFF*angleP);
    newValue2 = newValue;
    Poke((void*)cP.lookXa, &newValue2,4);
    }

    /*Sec 4*/
    if(oP.coordEW >= cP.coordEW && oP.coordNS > cP.coordNS)
    {
    EWdif = oP.coordEW - cP.coordEW;
    NSdif = oP.coordNS - cP.coordNS;
    angleA = atan(NSdif/EWdif) * 57.29578;
    angleP = (angleA/360);
    newValue = 0 + (0xFFFFFFFF*angleP);
    newValue2 = newValue;
    Poke((void*)cP.lookXa, &newValue2,4);
    }

    // Done the X-look, now this is for the Y-look

    double flatDist = sqrt((EWdif*EWdif)+(NSdif*NSdif)); // Get the level distance between us and the enemy, using pythagoras

    if(oP.coordUD == cP.coordUD)
    {
    BYTE zero4[4] = {0x00,0x00,0x00,0x00};
    Poke((void*)cP.lookYa,zero4, 4); // If we are equal height, set our Y-look to 0 (level)

    } else if(oP.coordUD > cP.coordUD)
    {
    UDdif = oP.coordUD - cP.coordUD; // Work out our UDdif
    angleB = atan(UDdif/flatDist) * 57.29578; // Same old stuff as before
    angleBP = (angleB/360);
    newValueb = 0 + (0xFFFFFFFF*angleBP);
    newValueb2 = newValueb;
    Poke((void*)cP.lookYa, &newValueb2,4);

    } else if (oP.coordUD < cP.coordUD)
    {
    UDdif = cP.coordUD - oP.coordUD;
    angleB = atan(UDdif/flatDist) * 57.29578;
    angleBP = (angleB/360);
    newValueb = 0xFFFFFFFF - (0xFFFFFFFF*angleBP);
    newValueb2 = newValueb;
    Poke((void*)cP.lookYa, &newValueb2,4);
    }


    also you guys can try too

  2. #2
    ғᴜᴋᴏᴊʀ's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    1,568
    Reputation
    87
    Thanks
    141
    My Mood
    Inspired
    Please wrap in [ code] and [ /code] (without spaces) and then I will maybe bother to read through it
    Edit:
    Oh and no because you need the playernumber byte, which judging by how this is leeched, you don't have. Plus you need some other functions I think

  3. #3
    dugindog's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    jasper mn
    Posts
    189
    Reputation
    7
    Thanks
    7
    My Mood
    Twisted
    i got it from someone here

    do you know the number???

  4. #4
    zmansquared's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Kickin it at Microsoft
    Posts
    2,088
    Reputation
    36
    Thanks
    221
    My Mood
    Cheerful
    i do, but i think you bit off alittle more than you can chew. go for real chams first bro
    Need Help With Coding or Something??? MSN me
    zmansquared@hotmail.com


    I am the one and only Microsoft Fag!!!

    Quote:
    Originally Posted by Arhk
    All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
    ~


    Take this Pic everyone!



    next-

Similar Threads

  1. Could anyone tell me how this works?
    By Hippiexchild in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 1
    Last Post: 06-18-2010, 11:03 AM
  2. Could this work?
    By vbpointer85 in forum Combat Arms Discussions
    Replies: 9
    Last Post: 06-15-2010, 06:26 PM
  3. Would this work?
    By Ryguy in forum Combat Arms Hacks & Cheats
    Replies: 17
    Last Post: 09-15-2008, 06:28 PM
  4. why doesnt this work?
    By $GHOST$ in forum C++/C Programming
    Replies: 11
    Last Post: 04-06-2006, 10:34 PM
  5. Would this work...?
    By Frolite in forum WarRock - International Hacks
    Replies: 6
    Last Post: 01-16-2006, 02:39 PM