Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local weathersounds = {
- "thunder.mp3",
- "crow.mp3",
- }
- function PlayWeatherAmbience()
- local weatherID = getWeather()
- if weatherID == 8 or weatherID == 9 or weatherID == 16 or weatherID == 20 or weatherID == 118 then
- WeatherSound = playSound(weathersounds[math.random(1,#weathersounds)])
- setSoundVolume(WeatherSound,0.5)
- end
- end
- setTimer(PlayWeatherAmbience,60000,0)
- addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),PlayWeatherAmbience)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement