papam77 Posted July 4, 2013 Share Posted July 4, 2013 Hello is possible to make if time get 18:00 then set water level to 3 ? Link to comment
iPrestege Posted July 4, 2013 Share Posted July 4, 2013 getTime setWaterLevel onClientRender Link to comment
bandi94 Posted July 4, 2013 Share 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 Link to comment
papam77 Posted July 5, 2013 Author Share Posted July 5, 2013 so if ( 18:00 ) then setWaterLevel ( theWater, 5 ) ? Link to comment
MIKI785 Posted July 5, 2013 Share Posted July 5, 2013 Read the wiki for once... what you wrote doesn't make sense. getTime returns 2 ints. Link to comment
AMARANT Posted July 5, 2013 Share 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 Link to comment
papam77 Posted July 5, 2013 Author Share Posted July 5, 2013 I setted it to current time and doesn't work. Link to comment
AMARANT Posted July 5, 2013 Share 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! Link to comment
Jesseunit Posted July 5, 2013 Share 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 ) Link to comment
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