Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


C++ XYZ Freeze Help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
nitrox
How do I cheat?
Reputation: 0

Joined: 16 Mar 2013
Posts: 3

PostPosted: Sat Mar 30, 2013 10:34 pm    Post subject: C++ XYZ Freeze Help Reply with quote

Can someone please show me how they freeze x and y coords, This would be simple if i was dealing with a static value, But as im trying to read the current x and y and then freeze them if HP drops below 100. Im finding this really hard.

Thanks Guys

I will explain a little easier below.. keep reading lol.



If i want to get a freeze effect, I will use a while loop. This works Fine

Code:
while (1)
{
*(float*)0x123456 = 1000;
}
Ok now this is what im trying to do is below

Code:

while (1)
{
*(float*)0x123456 = What ever value is currently stored in memory here;
}
So basicly i want to be able to loop the current value stored in memory at that moment in time, This value changes all the time..

Thank you


Last edited by nitrox on Sun Mar 31, 2013 8:17 am; edited 1 time in total
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Mar 31, 2013 7:25 am    Post subject: Reply with quote

You need to read the current value of the address into a buffer before you start your while loop to 'freeze' the value, then continuously write the new value to the address. Something like this:

Code:
void war( bool fEnable )
{
    // Read the original value..
    float fOriginal = *(float*)0x123456;
   
    while (true)
    {
        // Write the original back constantly..
        *(float*)0x123456 = fOriginal;
       
        // Sleep to prevent 100% CPU usage..
        Sleep( 10 );
       
        //
        // Add some code here to break the loop when needed..
        //
    }
}


Or you can patch all the functions that write to the address to prevent anything from overwriting it instead.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 340
Location: Somewhere....

PostPosted: Sun Mar 31, 2013 7:33 am    Post subject: Reply with quote

I don't get exactly what you want to do with that code, but generally,I guess you need to copy the HP value to a new DWORD, the same way done to the co-ordinates (the first condition of your code copies them), so when you want to restore the co-ordinates, the HP value at that time, will be restored too.
Back to top
View user's profile Send private message
nitrox
How do I cheat?
Reputation: 0

Joined: 16 Mar 2013
Posts: 3

PostPosted: Sun Mar 31, 2013 8:06 am    Post subject: Reply with quote

I would just like to say, Thank you very much for the help.

I was going the wrong way about this, i managed to basicly just change a [EAX+30] value. now this locks my coords to current postion.

why am i so stupid lol,

once again thank you very much
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites