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 


Overlay in GTA5

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

Joined: 27 Jul 2013
Posts: 121

PostPosted: Tue Dec 28, 2021 9:24 pm    Post subject: Overlay in GTA5 Reply with quote

Hi! I found some code in the forum to do a simple overlay of text, but im having trouble, this is what i got:

Code:
[ENABLE]
{$lua}
errorOnLookupFailure(false)
if syntaxcheck then return end
--============================================================
d3dhook_initializeHook()
font=createFont()
fontmap=d3dhook_createFontmap(font)
DisplayedTextObject=d3dhook_createTextContainer(fontmap,100,100,'Initial text or empty string')
d3dhook_textcontainer_setText
d3dhook_textcontainer_setText(DisplayedTextObject, "Updated Text")
--============================================================
createTimer(2500, function() memrec.Active = false; end)
{$asm}
[DISABLE]


GTA5 is on dx11.
The trouble is that it doesn't show up, i expected that it would show some text for about 2.5 secs.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Wed Dec 29, 2021 1:05 am    Post subject: Reply with quote

run the lua code inside a lua engine window manually
at least then the errors are easier to read

_________________
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
View user's profile Send private message MSN Messenger
careca777
Expert Cheater
Reputation: 0

Joined: 27 Jul 2013
Posts: 121

PostPosted: Wed Dec 29, 2021 4:07 am    Post subject: Reply with quote

Thank you.
This is the output:

Error:[string "d3dhook_initializeHook()
..."]:11: attempt to index a nil value (global 'memrec')

Which seems to refer to the timer line.
edit: After removing the line i don't get the error, but i also still dont have any overlay.
Back to top
View user's profile Send private message
Frouk
Master Cheater
Reputation: 5

Joined: 22 Jun 2021
Posts: 489
Location: mov dword ptr [Ukraine]

PostPosted: Wed Dec 29, 2021 10:54 am    Post subject: Re: Overlay in GTA5 Reply with quote

Code:
[ENABLE]
{$lua}
errorOnLookupFailure(false)
if syntaxcheck then return end
--============================================================
d3dhook_initializeHook()
font=createFont()
fontmap=d3dhook_createFontmap(font)
DisplayedTextObject=d3dhook_createTextContainer(fontmap,100,100,'Initial text or empty string')
--d3dhook_textcontainer_setText --empty entry input,but it should be
d3dhook_textcontainer_setText(DisplayedTextObject, "Updated Text")
--============================================================
createTimer(2500, function() memrec.Active = false; end)
{$asm}
[DISABLE]


I guess it doesn't show because there's d3dhook_textcontainer_setText have empty entry input
maybe thats is problem
edit: and maybe because there's no injected custom d3d

_________________
void(__cdecl *Haxing)(HWND hGameWindow)
Back to top
View user's profile Send private message
careca777
Expert Cheater
Reputation: 0

Joined: 27 Jul 2013
Posts: 121

PostPosted: Thu Dec 30, 2021 8:18 am    Post subject: Reply with quote

Would appreciate any input or direction to try to make this work.

Thanks.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Thu Dec 30, 2021 8:58 am    Post subject: Reply with quote

without any error there's not much to say.

Sometimes the hook just doesn't work. You could try messing with the graphics settings and lower them. That sometimes works

_________________
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
View user's profile Send private message MSN Messenger
careca777
Expert Cheater
Reputation: 0

Joined: 27 Jul 2013
Posts: 121

PostPosted: Thu Dec 30, 2021 7:45 pm    Post subject: Reply with quote

Oh, that's disappointing. I thought it was something bad on my code, or missing code.

Thank you.

EDIT: Since this didn't work, i'm looking for a way to grab some values from the table and show them in game through another application/programming software.
I am failing to grab the values directly from the table, could i somehow output specific values from the table in any other way?
I am able to get the values from the console/print, but this steals focus and i would like to make it work in the background. Any ideas?


Last edited by careca777 on Thu Dec 30, 2021 8:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 50

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Thu Dec 30, 2021 8:22 pm    Post subject: Reply with quote

Try a transparent form.
_________________
Back to top
View user's profile Send private message Visit poster's website
careca777
Expert Cheater
Reputation: 0

Joined: 27 Jul 2013
Posts: 121

PostPosted: Fri Dec 31, 2021 5:00 am    Post subject: Reply with quote

Seems too complex to me, but will look more into it.
Thanks
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