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 


Sound for activate or deactivate trainer

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

Joined: 31 Aug 2013
Posts: 305

PostPosted: Fri Jun 10, 2016 12:27 pm    Post subject: Sound for activate or deactivate trainer Reply with quote

Hi
How to make lua script for use from two music(sound) when press a key for activate trainer, if game was found , play sound 1(Trainer activate). Then if game was not found ,play sound2 (Trainer can not find game).

Very Thanks from your answer
*SJL002*
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Fri Jun 10, 2016 1:54 pm    Post subject: Reply with quote

Code:
activateTrainerHK = createHotkey(function(sender)
    local soundstream = createMemoryStream()
    if openProcess("calc.exe") then
      soundstream.loadFromFile("C:\\Windows\\Media\\tada.wav")
    else
      soundstream.loadFromFile("C:\\Windows\\Media\\Windows Error.wav")
    end
    playSound(soundstream)
    soundstream.destroy()
  end, VK_F12)

activateTrainerHK.DelayBetweenActivate = 1000

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
sjl002
Master Cheater
Reputation: 0

Joined: 31 Aug 2013
Posts: 305

PostPosted: Fri Jun 10, 2016 6:51 pm    Post subject: Reply with quote

oh this script work very good,very thanks for your great helps
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