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 


Modifing other addreses in C++

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Kewun
Cheater
Reputation: 0

Joined: 18 Sep 2016
Posts: 32

PostPosted: Fri Apr 14, 2017 1:02 am    Post subject: Modifing other addreses in C++ Reply with quote

Im trying to modify some addreses with processname.exe+00238489 in C++ but it doesnt seem to work, only addreses like 0x006FB1C8 work
example

*(FLOAT*)0x8F2CD4 = 2;

this works, but when i try
*(FLOAT*)gta3.exe+0025505 = 2;
it just doesnt work because i get error gta3 is undefined
or other example *(FLOAT*)lu.dll+001B3DAA = 5; also lu.dll is not defined
do i have to find static addres or how do i fix this? any way ? help
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 344

Joined: 09 May 2003
Posts: 20103
Location: The netherlands

PostPosted: Fri Apr 14, 2017 1:25 am    Post subject: Reply with quote

first find the module base and then add to it
http://forum.cheatengine.org/viewtopic.php?p=5280115#5280115

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 137

Joined: 25 Jan 2006
Posts: 7318
Location: 127.0.0.1

PostPosted: Fri Apr 14, 2017 11:37 am    Post subject: Reply with quote

Based on the main post, he is injected into the target progress, so you can instead just use GetModuleHandle rather than the enumeration API to get the addresses of things.

For example:
Code:

auto gameBase = (uintptr_t)::GetModuleHandle("gta3.exe");
*(FLOAT*)(gameBase + 0x8F2CD4) = 2;

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

Joined: 18 Sep 2016
Posts: 32

PostPosted: Sat May 13, 2017 3:56 am    Post subject: m̰᷈ͤ᷈᷈&# Reply with quote

thx, worked
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