Advertisement
No4NaMe

Untitled

Mar 15th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. function Nightmare()
  2. local hours,minute = getTime()
  3. setTime(hours,minute)
  4. if ( hours >= 09 ) and ( hours < 12 ) then
  5. local sound = playSound ( "day.mp3")
  6. elseif ( hours >= 12 ) and ( hours < 15 ) then
  7. local sound = playSound ( "day.mp3")
  8. elseif ( hours >= 15 ) and ( hours < 20 ) then
  9. local sound = playSound ( "night.mp3")
  10. elseif ( hours >= 20 ) and ( hours < 24 ) then
  11. local sound = playSound ( "night.mp3")
  12. end
  13. if ( isElement (sound)) then
  14. destroyElement (sound)
  15. setTimer(Nightmare, 3000, 0)
  16. end
  17. end
  18. addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),Nightmare)
  19. --addEventHandler ( "onClientRender",root,Nightmare)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement