Advertisement
No4NaMe

SoundNature

Mar 15th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. function playTimeSound()
  2. local hour, minutes = getTime()
  3. if hour == 06 and minutes == 0 then
  4. local timesound = playSound(":DayZ/sounds/ambience/day.mp3",true)
  5. elseif hur == 12 and minutes == 0 then
  6. local timesound = playSound(":DayZ/sounds/ambience/day.mp3",true)
  7. elseif hour == 15 and minutes == 0 then
  8. local timesound = playSound(":DayZ/sounds/ambience/day.mp3",true)
  9. elseif hour == 20 and minutes == 0 then
  10. local timesound = playSound(":DayZ/sounds/ambience/night.mp3",true)
  11. setSoundVolume(timesound,gameplayVariables["ambiencesoundvolume"])
  12. end
  13. end
  14. addEventHandler("onClientRender", getRootElement(), playTimeSound )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement