Javier Posted February 19, 2013 Share Posted February 19, 2013 Hello friends, look my script. I want the water to change color but do not know if this is well done. local waters = { } water[1] = "255, 255, 100, 20" water[2] = "100, 20, 30, 40" water[3] = "0, 0, 0, 0" function cambio () setWaterColor ( [ math.random ( #waters ) ] ) end addEventHandler("onResourceStart", cabio) setTimer(cambio, 10000, 0) Thanks. Link to comment
Vision Posted February 19, 2013 Share Posted February 19, 2013 local waters = { { 255, 255, 100, 20 }, { 100, 20, 30, 40 }, { 0, 0, 0, 0 } } function cambio ( ) setWaterColor ( unpack ( waters [ math.random ( #waters ) ] ) ) end addEventHandler ( "onResourceStart", resourceRoot, cambio ) setTimer ( cambio, 10000, 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