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 


Game status ( on / off)

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

Joined: 05 Jun 2014
Posts: 86

PostPosted: Thu Sep 29, 2016 4:59 am    Post subject: Game status ( on / off) Reply with quote

I have made this lua

function CETimer1Timer(sender)
if getProcessIDFromProcessName(ProcssName) ~= nil
then online =true
else online = false
end
if online then
getAutoAttachList().add(ProcssName)
control_setCaption(MadMax_CELabel1, "Game Is ON!")
else
control_setCaption(MadMax_CELabel1, "Game Is Off!")
end
end

But i don't see in my form game status.
Back to top
View user's profile Send private message
HyberCode
Cheater
Reputation: 0

Joined: 17 Feb 2016
Posts: 40

PostPosted: Thu Sep 29, 2016 8:59 am    Post subject: Re: Game status ( on / off) Reply with quote

if getProcessIDFromProcessName(ProcssName) ~= nil then
Formname.MadMax.Caption = "Game is On"
end
if getProcessIDFromProcessName(ProcssName) == nil then
Formname.MadMax.Caption = "Game is Off"
end
Back to top
View user's profile Send private message
mausi125
Advanced Cheater
Reputation: 1

Joined: 05 Jun 2014
Posts: 86

PostPosted: Thu Sep 29, 2016 12:10 pm    Post subject: Re: Game status ( on / off) Reply with quote

cheatislove cheatislife wrote:
if getProcessIDFromProcessName(ProcssName) ~= nil then
Formname.MadMax.Caption = "Game is On"
end
if getProcessIDFromProcessName(ProcssName) == nil then
Formname.MadMax.Caption = "Game is Off"
end


can you say what it's wrong with my lua ? i have a error with your lua
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Thu Sep 29, 2016 7:35 pm    Post subject: Reply with quote

Code:
if getOpenedProcessID() ~= 0 and readInteger(ProcessName) ~= nil then
  Formname.MadMax.Caption = "Game is On"
else
  Formname.MadMax.Caption = "Game is Off"
end
Back to top
View user's profile Send private message
mausi125
Advanced Cheater
Reputation: 1

Joined: 05 Jun 2014
Posts: 86

PostPosted: Fri Sep 30, 2016 7:06 am    Post subject: Reply with quote

Zanzer wrote:
Code:
if getOpenedProcessID() ~= 0 and readInteger(ProcessName) ~= nil then
  Formname.MadMax.Caption = "Game is On"
else
  Formname.MadMax.Caption = "Game is Off"
end


Thanks Razz
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