Results 1 to 9 of 9
  1. #1
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,014
    Reputation
    202
    Thanks
    2,934
    My Mood
    Twisted

    Player Yaw and Pitch

    Code:
    typedef float (*Pitch_t)(void); 
    float PlayerPitch(){
    DWORD* PlayerMGR = (DWORD*)0x00112233;//PlayerManager Address
    Pitch_t Pitch = *(Pitch_t*)(*PlayerMGR + 0x48);
    return Pitch();
    }
    Then your pitch value is PlayerPitch()

    Then for Yaw:

    Code:
    typedef float (*Yaw_t)(void); 
    float PlayerYaw(){
    DWORD* PlayerMGR = (DWORD*)0x00112233;//PlayerManager Address
    Yaw_t Yaw = *(Yaw_t*)(*PlayerMGR + 0x4C);
    return Yaw();
    }
    Then your Yaw is PlayerYaw()

    Credits: Me
    Gellin (Offsets)
    Last edited by CAFlames; 08-21-2011 at 06:25 PM.

    Current Works:
    ---Horror Game






    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.

  2. The Following User Says Thank You to CAFlames For This Useful Post:

    Xlilzoosk8rX (08-25-2011)

  3. #2
    Refrain's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    136
    Reputation
    22
    Thanks
    28
    Why are you doing all that typedef stuff it just makes it ugly

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

    [MPGH]Jason (08-22-2011)

  5. #3
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,706
    Reputation
    918
    Thanks
    7,395
    My Mood
    Mellow
    Quote Originally Posted by Refrain View Post
    Why are you doing all that typedef stuff it just makes it ugly
    Especially when you're returning the primitive type anyway .

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I donít think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  6. #4
    _Dead's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    13
    Reputation
    10
    Thanks
    4
    Use a class and the real address?

  7. #5
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,706
    Reputation
    918
    Thanks
    7,395
    My Mood
    Mellow
    I would just do it as:

    Code:
    #define PLAYER_MANAGER 0xDEADBEEF
    #define ReadFromManager(type, offset) (type)(*(DWORD*)PLAYER_MANAGER + offset)
    
    static float GetPlayerPitch()
    {
        return *ReadFromManager(float*, 0x48);
    }
    
    static float GetPlayerYaw()
    {
        return *ReadFromManager(float*, 0x4C);
    }
    EDIT: Setting obviously:
    Code:
    //same defines as above
    static void SetPlayerPitch(float value)
    {
        *ReadFromManager(float*, 0x48) = value;
    }
    
    static void SetPlayerYaw(float value)
    {
        *ReadFromManager(float*, 0x4C) = value;
    }
    Although that's completely untested. Seems like a generic solution would be better suited.
    Last edited by Jason; 08-23-2011 at 04:21 AM.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I donít think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  8. The Following User Says Thank You to Jason For This Useful Post:

    _Fk127_ (08-23-2011)

  9. #6
    Xlilzoosk8rX's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    the-ville, PA
    Posts
    358
    Reputation
    24
    Thanks
    53
    thanks i been looking for this for a wile and no one would release.

  10. #7
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,940
    My Mood
    Cool
    why you had to create a typedef float and not just a regular float?
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  11. #8
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,706
    Reputation
    918
    Thanks
    7,395
    My Mood
    Mellow
    Quote Originally Posted by topblast View Post
    why you had to create a typedef float and not just a regular float?
    'Cos extra, useless, code such as that typedef makes you look 1337er. Duh.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I donít think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  12. #9
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,940
    My Mood
    Cool
    Quote Originally Posted by Jason View Post


    'Cos extra, useless, code such as that typedef makes you look 1337er. Duh.
    lol, dont be sooo harsh,
    Replace { & } with [ & ]
    [highlight=CPP]typedef struct
    {
    union
    {
    float Float;
    DWORD Dword;
    WORD Word{2};
    int Int;
    short Short{2};
    char Char{4};
    BYTE Byte{4};
    };
    } FLT;



    float PlayerYaw()
    {
    DWORD* PlayerMGR = (DWORD*)0x00112233;//PlayerManager Address
    FLT Yaw = *(Yaw_t*)(*PlayerMGR + 0x4C);
    return Yaw();
    }[/highlight]
    Last edited by topblast; 08-27-2011 at 11:46 AM.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

Similar Threads

  1. [Solved] roll yaw and pitch
    By kuyakyloo in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 5
    Last Post: 07-21-2011, 03:26 AM
  2. [SOLVED] Player Glow and GM?
    By lostedminds in forum CrossFire Help
    Replies: 2
    Last Post: 10-10-2010, 11:34 PM
  3. [Release] *NEW*Ghost Beta v2,No Smoke(Player Frame) And...
    By [Banned]mark0108 in forum CrossFire Hacks & Cheats
    Replies: 186
    Last Post: 09-27-2010, 06:34 PM
  4. [Help] Detecting player hits and timers!
    By master131 in forum Call of Duty Modern Warfare 2 Help
    Replies: 0
    Last Post: 08-24-2010, 06:28 PM
  5. [IMPORTANT] if you edited the player.txt and....
    By KnockOut in forum Combat Arms Hacks & Cheats
    Replies: 51
    Last Post: 04-02-2009, 12:07 PM