TalkingHelpHow To Create A Toggle Function CE

Posts 1–5 of 5 · Page 1 of 1
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.
Quote Originally Posted by 258456 View Post
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.)
Quote Originally Posted by radnomguywfq3 View Post
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 @radnomguywfq3, 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

You can convert to C++ ?
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

Talk with us