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 


Cant call a function cause idk how

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
SrmsReis
How do I cheat?
Reputation: 0

Joined: 28 Feb 2021
Posts: 7
Location: Brazil

PostPosted: Wed May 05, 2021 7:04 am    Post subject: Cant call a function cause idk how Reply with quote

I tried everything but I didnt make it, im trying to call a function what create a text on my screen
Im kinda newbie in cheat engine so here is the picture of the call



Screenshot_241.png
 Description:
 Filesize:  23.46 KB
 Viewed:  1563 Time(s)

Screenshot_241.png


Back to top
View user's profile Send private message
Bloodybone
Newbie cheater
Reputation: 0

Joined: 07 Dec 2016
Posts: 20
Location: Germany

PostPosted: Tue May 11, 2021 12:43 pm    Post subject: Cant call a function cause idk how Reply with quote

I've written some sample code which should show the text: "This is some test Text" onto your screen. You can also change any variables passed to the function by just changing the variables under "// Data"

Code:
[ENABLE]
alloc(testcallmem,0x1000)
registersymbol(testcallmem)

label(testcall_position_1)
label(testcall_position_2)
label(testcall_position_3)

label(testcall_font)

label(testcall_color_1)
label(testcall_color_2)
label(testcall_color_3)

label(testcall_opacity)

label(testcall_text)

createthread(testcallmem) // Run Code

testcallmem:
// it seems like the function is using the cdecl calling convention
// push all parameters from right to left onto stack because cdecl
push [testcall_opacity] // opacity?
push [testcall_color_3] // color 3
push [testcall_color_2] // color 2
push [testcall_color_1] // color 1
push [testcall_font] // font
push [testcall_position_3] // position 3
push [testcall_position_2] // position 2
push [testcall_position_1] // position 1
push [testcall_text] // Text
call subrosa.exe+106B30 // Call function
add esp,24 // Cleanup Stack because cdecl
ret // Exit

align 4 CC // Align Memory (optional)

// Data

testcall_position_1:
dd (float)512
testcall_position_2:
dd (float)320
testcall_position_3:
dd (float)16

testcall_font:
dd 21

testcall_color_1:
dd (float)1
testcall_color_2:
dd (float)1
testcall_color_3:
dd (float)1

testcall_opacity: // This is your unknown variable but because you said that if you load 0 the text disappears it might be the opacity
dd (float)1

testcall_text:
db 'This is some test Text',0 // 0-Terminated Ansi String

[DISABLE]
dealloc(testcallmem)
unregistersymbol(testcallmem)
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 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