Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Nightmare()
- local hours,minute = getTime()
- setTime(hours,minute)
- if ( hours >= 09 ) and ( hours < 12 ) then
- local sound = playSound ( "day.mp3")
- elseif ( hours >= 12 ) and ( hours < 15 ) then
- local sound = playSound ( "day.mp3")
- elseif ( hours >= 15 ) and ( hours < 20 ) then
- local sound = playSound ( "night.mp3")
- elseif ( hours >= 20 ) and ( hours < 24 ) then
- local sound = playSound ( "night.mp3")
- end
- if ( isElement (sound)) then
- destroyElement (sound)
- setTimer(Nightmare, 3000, 0)
- end
- end
- addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),Nightmare)
- --addEventHandler ( "onClientRender",root,Nightmare)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement