Bean666 Posted May 17, 2016 Posted May 17, 2016 (edited) How can i make this sound repeat endless? addEvent("soundin",true) addEventHandler("soundin", getRootElement(), function () sound = playSound("sound/music.mp3", false) if isElement(sound) then setSoundVolume(sound, 0.2) end end ) Edited May 17, 2016 by Guest Aftermath
Walid Posted May 17, 2016 Posted May 17, 2016 All what you need is: "onClientSoundStopped" Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
Bean666 Posted May 17, 2016 Author Posted May 17, 2016 never heard of that before. anyways ty, ill contact you when i got errors. Aftermath
Dealman Posted May 17, 2016 Posted May 17, 2016 playSound has a boolean for looping already, you've set it to false. Set it to true and it'll loop automatically. sound = playSound("sound/music.mp3", true) If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.
Bean666 Posted May 17, 2016 Author Posted May 17, 2016 function onSoundStopped() playSound( sound ) end addEventHandler ( "onClientSoundStopped", getRootElement(), onSoundStopped ) tried this , only got errors when sound ends. [expected string at argument 1 , got sound ] EDIT: OK thanks! never noticed that earlier Aftermath
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