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 


Need another small help

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

Joined: 06 Oct 2015
Posts: 9

PostPosted: Sun Oct 11, 2015 5:52 am    Post subject: Need another small help Reply with quote

Hello, I need small help to do script which will write value to label from address in CE

I made this

function to do this + timer for check value of my address
my funtion works but I'd that

Code:
 setProperty(MyForm_Test2,"Caption", "TOTAL DAMAGE")


will read value from address TOTAL DAMAGE and will write in Caption of label

atm my function only write TOTAL DAMAGE when my address will get value more than 1


Code:
function Testt(sender)
  if  (GetRec("TOTAL DAMAGE")>="1") then
     setProperty(MyForm_Test2,"Caption", "TOTAL DAMAGE")
  else
     setProperty(MyForm_Test2,"Caption",0)
  end
end



function TestON(sender)
 if checkbox_getState(sender)== 1 then
    setProperty(MyForm_TestTime,"Enabled",1)
  else
    setProperty(MyForm_TestTime,"Enabled",false)
  end
end


Does some1 know how to do it?
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Oct 11, 2015 6:15 am    Post subject: Reply with quote

Sorry, having a hard time understanding what it is you want.
Do you want the label to show the number?
Code:
function Testt(sender)
  setProperty(MyForm_Test2,"Caption", "TOTAL DAMAGE: " .. GetRec("TOTAL DAMAGE"))
end
Back to top
View user's profile Send private message
bosman88
How do I cheat?
Reputation: 0

Joined: 06 Oct 2015
Posts: 9

PostPosted: Sun Oct 11, 2015 6:33 am    Post subject: Reply with quote

Code:
function Testt3(sender)
  local memrec=addresslist_getMemoryRecordByDescription(getAddressList(), "TOTAL DAMAGE")
  local value=memoryrecord_getValue(memrec)
  control_setCaption(MyForm_Test2, value)
end


Now works, found one script which DarkByte wrote to someone and works, anyway thanks for help Smile
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