papam77 Posted July 4, 2013 Posted July 4, 2013 Hello is possible to make if time get 18:00 then set water level to 3 ?
bandi94 Posted July 4, 2013 Posted July 4, 2013 getTime setWaterLevel onClientRender with a timmer on 10-15s it's better. No need to force older PC with onClientRender just for check if the time is 18:00
papam77 Posted July 5, 2013 Author Posted July 5, 2013 so if ( 18:00 ) then setWaterLevel ( theWater, 5 ) ?
MIKI785 Posted July 5, 2013 Posted July 5, 2013 Read the wiki for once... what you wrote doesn't make sense. getTime returns 2 ints.
AMARANT Posted July 5, 2013 Posted July 5, 2013 No. getTime returns two integers - hours and minutes. So: local hours,minutes = getTime() if hours==18 and minutes==0 then setWaterLevel(theWater,5) end
AMARANT Posted July 5, 2013 Posted July 5, 2013 It's not a full code of your whole system! It's just an example on how to handle getTime() function!
Jesseunit Posted July 5, 2013 Posted July 5, 2013 I setted it to current time and doesn't work. function check_water ( ) local hours, _ = getTime ( ) if hours >= 18 then killTimer ( waterTimer ) setWaterLevel ( 5 ) outputChatBox ( "Hai, water raised and timer killed.", root, 255, 111, 111, false ) end end waterTimer = setTimer ( check_water, 1000, 0 )
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