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]What is wrong with this?

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

Joined: 11 Aug 2014
Posts: 27

PostPosted: Fri Aug 19, 2016 10:24 am    Post subject: [HELP]What is wrong with this? 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:13 pm    Post subject: Reply with quote

Wrong sub-forum. And there is no need to double-post.
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:34 pm    Post subject: Reply with quote

++METHOS wrote:
Wrong sub-forum. And there is no need to double-post.


Sorry,Sir!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting 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