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 


[HELP]Save/Load coordinates script problem!

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

Joined: 11 Aug 2014
Posts: 27

PostPosted: Fri Aug 19, 2016 8:02 am    Post subject: [HELP]Save/Load coordinates script problem! Reply with quote

Hi! I'm trying to save and load coordinates, but I can't do this to work!
(I'm a little noob Rolling Eyes )
Thanks in advance for your help!

[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
label(z_coord)
label(x_coord)
label(y_coord)
label(save_coord)
label(load_coord)
label(s_enable)
label(l_enable)
registersymbol(s_enable)
registersymbol(l_enable)


"gta3.exe"+9FA27:
jmp newmem
nop
returnhere:


newmem:
cmp [s_enable],1
je save_coord
cmp [l_enable],1
je load_coord
jmp originalcode


save_coord:
mov [s_enable],0
push edx
mov edx,[ebp+38]
mov [x_coord],edx
mov edx,[ebp+34]
mov [z_coord],edx
mov edx,[ebp+3C]
mov [y_coord],edx
pop edx
jmp originalcode

load_coord:
mov [l_enable],0
cmp [z_coord],0
je originalcode
push edx
mov edx,[x_coord]
mov [ebp+38],edx
mov edx,[z_coord]
mov [ebp+34],edx
mov edx,[y_coord]
mov [ebp+3C],edx
pop edx


originalcode:
fstp dword ptr [ebp+34]
fld dword ptr [ebp+38]

exit:
jmp returnhere

x_coord:
dd 0
z_coord:
dd 0
y_coord:
dd 0
s_enable:
dd 0
l_enable:
dd 0

[DISABLE]
dealloc(newmem)
"gta3.exe"+9FA27:
fstp dword ptr [ebp+34]
fld dword ptr [ebp+38]
unregistersymbol(s_enable)
unregistersymbol(l_enable)
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Aug 19, 2016 12:10 pm    Post subject: Reply with quote

Did you add the custom addresses to your table (i.e. the s_enable and l_enable) and assign hotkeys to them to set their values to 1?
Back to top
View user's profile Send private message
jeck00119
Cheater
Reputation: 0

Joined: 11 Aug 2014
Posts: 27

PostPosted: Fri Aug 19, 2016 12:28 pm    Post subject: Reply with quote

++METHOS wrote:
Did you add the custom addresses to your table (i.e. the s_enable and l_enable) and assign hotkeys to them to set their values to 1?


Yes,I did.Nothing happens.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Aug 19, 2016 12:42 pm    Post subject: Reply with quote

Then check to make sure that you are using the correct instruction for your injection point (and) that no other addresses are being accessed by that instruction (it's likely that you will have to filter them out so that only your player coordinates are affected).
Back to top
View user's profile Send private message
jeck00119
Cheater
Reputation: 0

Joined: 11 Aug 2014
Posts: 27

PostPosted: Fri Aug 19, 2016 12:57 pm    Post subject: Reply with quote

++METHOS wrote:
Then check to make sure that you are using the correct instruction for your injection point (and) that no other addresses are being accessed by that instruction (it's likely that you will have to filter them out so that only your player coordinates are affected).


Only the player accesses the instruction.The coordinates are saved but they don't load or something like this,I don't know.



Capture.png
 Description:
 Filesize:  29.44 KB
 Viewed:  7828 Time(s)

Capture.png


Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Aug 19, 2016 2:56 pm    Post subject: Reply with quote

Right-click on the first instruction: fstp dword ptr [ebp+34] and check to see what addresses it accesses.

In your cheat table, when you press your hotkey to save your coordinates, it should flicker from 1 and then back to 0 really fast. Does it do that? Additionally, when you press your hotkey to load your coordinates, does it flicker from 1 to 0, or just stay as 1?
Back to top
View user's profile Send private message
jeck00119
Cheater
Reputation: 0

Joined: 11 Aug 2014
Posts: 27

PostPosted: Fri Aug 19, 2016 6:07 pm    Post subject: Reply with quote

Sorry for the delay:(!!The instruction is accessed only by the player and the save/load hotkeys flick from 1 and then back to 0 fast.I don't know what to do. Sad
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Aug 19, 2016 8:58 pm    Post subject: Reply with quote

There may be a better injection point. Try to inject using an instruction that, if NOP'd, does not allow your character to move. Doing so, may require you to incorporate a filter, but you can simply use the current instruction for that.
Back to top
View user's profile Send private message
jeck00119
Cheater
Reputation: 0

Joined: 11 Aug 2014
Posts: 27

PostPosted: Sat Aug 20, 2016 4:00 am    Post subject: Reply with quote

Thanks a lot for your help,Sir! I will try.
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 Gamehacking 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