| View previous topic :: View next topic |
| Author |
Message |
Fresco Grandmaster Cheater
Reputation: 4
Joined: 07 Nov 2010 Posts: 600
|
Posted: Mon Feb 27, 2012 4:45 pm Post subject: store double value |
|
|
i have found that the address that points to health is [eax+5]
it's a double, and max value is 32
in my code i wrote this:
| Code: | | mov dword ptr [eax+5],32 |
to set health to max
but in the cheat table a get something like 32.000000000000004
how do i store 32 (double) in [eax+5] ?
_________________
... Fresco |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25815 Location: The netherlands
|
Posted: Mon Feb 27, 2012 5:05 pm Post subject: |
|
|
Are you sure it is stored as a double with value 32 and not as a float with value 3 as max? (they are built from the same last 4 bytes)
(and are you sure about that +5 thing (compilers tend to hate doing that , and certain windows versions will cause a slowdown if this is executed often)
anyhow, a double is 8 bytes long so you will need multiple instructions to set the value (if it's a float you'd just do "mov dword ptr [eax+9],(float)3" )
| Code: |
alloc(doublestorage,8)
doublestorage:
dq (double)32
...
push ebx
mov ebx,[doublestorage]
mov dword ptr [eax+5],ebx
mov ebx,[doublestorage+4]
mov dword ptr [eax+9],ebx
pop ebx
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Fresco Grandmaster Cheater
Reputation: 4
Joined: 07 Nov 2010 Posts: 600
|
Posted: Tue Feb 28, 2012 8:13 am Post subject: |
|
|
it worked thanks
hex health value:
address: 00 00 00 00 00 00 40 40
_________________
... Fresco |
|
| Back to top |
|
 |
|