How do I create a function in C + + is the same as the Freeze Value CE?
Thankyou very much ^^
kumatddd.JPG
let's say you have an int at 0x12345678 that you want to always be 4, you would do:
Code:
while(1)
{
*(int*)(0x12345678) = 4;
}
There may be a different way to do it, but i think this is the easiest (hence the most ghetto haha). You are just setting he value over and over again to 4 in an infinite loop.
Originally Posted by 258456
let's say you have an int at 0x12345678 that you want to always be 4, you would do:
Code:
while(1)
{
*(int*)(0x12345678) = 4;
}
There may be a different way to do it, but i think this is the easiest (hence the most ghetto haha). You are just setting he value over and over again to 4 in an infinite loop.
What he said. Just keep in mind you probably don't need to set it that frequently and you'll want to put a sleep somewhere in there as well otherwise you're going to tie up an entire core - more or less.
*edit*
There are way better ways of doing it, but don't worry too much about them if you're just starting out. This method is good because it doesn't make any code-changes (though, most anti-hacking systems will only scan the prolouge stubs to prevent detouring, usually they don't do an entire function scan because there simply isn't enough processing power.)
What he said. Just keep in mind you probably don't need to set it that frequently and you'll want to put a sleep somewhere in there as well otherwise you're going to tie up an entire core - more or less.
*edit*
There are way better ways of doing it, but don't worry too much about them if you're just starting out. This method is good because it doesn't make any code-changes (though, most anti-hacking systems will only scan the prolouge stubs to prevent detouring, usually they don't do an entire function scan because there simply isn't enough processing power.)
What he said lol. Just make sure that the thread you are "Sleeping" in is a thread made by CreateThread() or _begin() because if it isn't a multithreaded thread then when you use Sleep() you will pause the whole game execution for that long.
Btw it's nice to see you again @Jetamay, it's been a while.
oldValue="";
function _memrec_Energy_activated(te)
oldvalue=memrec_getValue(te)
memrec_setValue(te,2000);
end
function _memrec_Energy_deactivated(te)
memrec_setValue(te,oldvalue)
end