Results 1 to 5 of 5
  1. #1
    Buttars0070's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    A very bright place
    Posts
    97
    Reputation
    10
    Thanks
    58
    My Mood
    Angelic

    Reading but not getting correct player position

    Is there any particular reason this is returning {1, 0, 0} no matter what?



    Code:
    DWORD m_dwLocalPlayer = 0xA30504;
    DWORD m_vecOrigin = 0x134;
    Code:
    float Pos[3];
    Pos[0] = RPM<float>(ClientDLL + m_dwLocalPlayer + m_vecOrigin);
    Pos[1] = RPM<float>(ClientDLL + m_dwLocalPlayer + m_vecOrigin + 0x4);
    Pos[2] = RPM<float>(ClientDLL + m_dwLocalPlayer + m_vecOrigin + 0x8);
    Last edited by Buttars0070; 06-10-2016 at 11:46 PM.



    If I helped you or enjoyed something I did, I would love it if you




     

    Overwatch Bans: 2 | VAC: 1
    50 posts ✔
    150 posts
    250 posts
    500 posts
    1000 posts
    50 thanks ✔
    200 thanks
    500 thanks
    1000 thanks
    1500 thanks
    2000 thanks
    2500 thanks
    3000 thanks
    100 downloads ✔
    500 downloads
    1000 downloads
    5000 downloads
    7500 downloads
    10000 downloads
    15000 downloads



     




  2. #2
    Yemiez's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Sweden
    Posts
    2,566
    Reputation
    731
    Thanks
    16,280
    My Mood
    Devilish
    Code:
    float Pos[3];
    unsigned int localBase = RPM<unsigned int>( ClientDLL + m_dwLocalPlayer );
    Pos[0] = RPM<float>(localBase + m_vecOrigin);
    Pos[1] = RPM<float>(localBase + m_vecOrigin + 0x4);
    Pos[2] = RPM<float>(localBase + m_vecOrigin + 0x8);
    I haven't done anything related to CS:GO in a very long time, but the above should probably work.

    You should however probably just make a struct that holds 3 floats, that way you only need to call RPM twice (localBase and Pos).

  3. The Following User Says Thank You to Yemiez For This Useful Post:

    Buttars0070 (06-11-2016)

  4. #3
    Buttars0070's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    A very bright place
    Posts
    97
    Reputation
    10
    Thanks
    58
    My Mood
    Angelic
    Quote Originally Posted by Yamiez View Post
    Code:
    float Pos[3];
    unsigned int localBase = RPM<unsigned int>( ClientDLL + m_dwLocalPlayer );
    Pos[0] = RPM<float>(localBase + m_vecOrigin);
    Pos[1] = RPM<float>(localBase + m_vecOrigin + 0x4);
    Pos[2] = RPM<float>(localBase + m_vecOrigin + 0x8);
    I haven't done anything related to CS:GO in a very long time, but the above should probably work.

    You should however probably just make a struct that holds 3 floats, that way you only need to call RPM twice (localBase and Pos).
    Thanks for the help, ill test it out now.

    The reason I don't use a Vector is because I'm putting it into a function that wants a float*, although the change would be very easy, this isn't my final version of my private. Thanks though

    God knows why that worked, Thanks @Yamiez

    /Solved, Close
    Last edited by Buttars0070; 06-11-2016 at 12:31 AM.



    If I helped you or enjoyed something I did, I would love it if you




     

    Overwatch Bans: 2 | VAC: 1
    50 posts ✔
    150 posts
    250 posts
    500 posts
    1000 posts
    50 thanks ✔
    200 thanks
    500 thanks
    1000 thanks
    1500 thanks
    2000 thanks
    2500 thanks
    3000 thanks
    100 downloads ✔
    500 downloads
    1000 downloads
    5000 downloads
    7500 downloads
    10000 downloads
    15000 downloads



     




  5. #4
    Yemiez's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Sweden
    Posts
    2,566
    Reputation
    731
    Thanks
    16,280
    My Mood
    Devilish
    Quote Originally Posted by Buttars0070 View Post
    The reason I don't use a Vector is because I'm putting it into a function that wants a float*, although the change would be very easy, this isn't my final version of my private. Thanks though
    You could still use a Vector class and just cast the pointer to a float*, the sizes are the same and indexing would still work fine. ^_^

    You could also just read 3 floats by creating a special RPM function:

    Code:
    template<typename T, unsigned size>
    bool RPM( unsigned int addr, T (&array)[size] )
    {
         return ReadProcessMemory( handle_, 
                                   reinterpret_cast<void*>( addr ),
                                   reinterpret_cast<void*>( &array ),
                                   sizeof(T) * size,
                                   nullptr ); 
    }
    Where you could just do this then:
    Code:
    float Pos[3];
    RPM( localBase + m_vecOrigin, Pos ); // T and size are deduced from argument inputs
    Last edited by Yemiez; 06-11-2016 at 12:40 AM.

  6. The Following User Says Thank You to Yemiez For This Useful Post:

    Buttars0070 (06-11-2016)

  7. #5
    rwby's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Location
    client.dll
    Posts
    1,631
    Reputation
    142
    Thanks
    6,724
    // Solved & Closed

Similar Threads

  1. Funny: In lobby but not as a player
    By Jorndel in forum Call of Duty Ghosts Discussions & Help
    Replies: 6
    Last Post: 11-20-2013, 08:35 AM
  2. [Help Request] Money Hack But Not Shown To Players
    By Heytherenewb in forum DayZ Help & Requests
    Replies: 6
    Last Post: 04-02-2013, 04:30 AM
  3. [Release] Getting Players Positions with CE...
    By kmanev073 in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 8
    Last Post: 08-06-2012, 12:47 AM
  4. [Help?] Get Player Position
    By DreadKyller in forum Combat Arms Coding Help & Discussion
    Replies: 22
    Last Post: 10-11-2010, 05:11 PM
  5. [please read] help from not getting detected by nexon!!
    By rob7601 in forum Combat Arms Discussions
    Replies: 3
    Last Post: 10-05-2009, 07:09 PM