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 


Rewrite Function readFloat and writeFloat

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

Joined: 04 Jan 2018
Posts: 10
Location: AUS

PostPosted: Sat Apr 11, 2020 2:53 am    Post subject: Rewrite Function readFloat and writeFloat Reply with quote

Hi all,

I would like to rewrite function readFloat and writeFloat. But I got 2 questions.
First I dont know where can I get the source code (which folder)? Second, how can I rewrite them especially readFloat function, what should it return?

Cheers!

_________________
gta5 creator st_of_dec
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 472

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

PostPosted: Sat Apr 11, 2020 2:56 am    Post subject: Reply with quote

You can use lua to rewrite it
Code:

function readFloat(address)
  --your implementation, e.g using a custom type
  return floatvalue
end

_________________
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
st_of_dec
Newbie cheater
Reputation: 0

Joined: 04 Jan 2018
Posts: 10
Location: AUS

PostPosted: Sat Apr 11, 2020 7:00 am    Post subject: Reply with quote

I try this and it works!
Code:
local readFloatB = readFloat
readFloat = function(...)
return string.format("%02.4f",readFloatB(...))
end

BTW thank Dark Byte for answering my question!

_________________
gta5 creator st_of_dec
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