Hero192 Posted January 20, 2016 Posted January 20, 2016 Hey guys, I am asking for a proper way for usage setTimer on this function I want to set the timer about 2 secs ( 2000miliseconds) but I failed function onPlaySound() local sound = playSound("file/sound.wav") setSoundVolume(sound, 0.5) end
Ab-47 Posted January 20, 2016 Posted January 20, 2016 function onPlaySound() local sound = playSound("file/sound.wav") setSoundVolume(sound, 0.5) end setTimer(onPlaySound, 2000, 0) This? And now Aurora is back again, pm for more info. Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA. Ex. Developer at Community of Social Gamers - CSG Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP Ab-47
ViRuZGamiing Posted January 20, 2016 Posted January 20, 2016 function onPlaySound() local sound = playSound("file/sound.wav") setSoundVolume(sound, 0.5) setTimer ( function() stopSound(sound) end, 2000, 1) end EDIT. This is to stop after 2000 ms, example above will start after 2000 ms "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now