#Whit3^ Posted February 8, 2013 Posted February 8, 2013 Sry Guys i Have an Question I want to practice when I press that button to activate this feature function randomVehColors() for i, car in ipairs( getElementsByType( "vehicle" ) ) do local colorecane = {} colorecane[1] = math.random(0,126) colorecane[2] = math.random(0,126) colorecane[3] = math.random(0,126) colorecane[4] = math.random(0,126) setVehicleColor ( car, colorecane[1], colorecane[2], colorecane[3], colorecane[4] ) outputChatBox("#00BFFF# #FFFFFFYour Lights has been saved!",255,255,255,true) end end setTimer( randomVehColors, 1500, 0 ) addEventHandler ( "onClientGUIClick", savelightsButton, randomVehColors)
K4stic Posted February 8, 2013 Posted February 8, 2013 here: addEventHandler ( "onClientGUIClick", here add button name, randomVehColors, false )
#Whit3^ Posted February 8, 2013 Author Posted February 8, 2013 sorry I have another problem ... Whenever the active userpanel that the colors change automatically. But I wish that when I press the button is activated if you turn off the riclicco know how to help me?
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