Dzsozi (h03) Posted June 13, 2014 Share Posted June 13, 2014 Hello everyone! I was thinking if is it possible to make the square blip flashing? So it changes it's color from red to blue and from blue to red in every 1.5 second. How is this possible? Could somebody help me please? Link to comment
Et-win Posted June 13, 2014 Share Posted June 13, 2014 setTimer getBlipColor setBlipColor Put it on a function which checks or the color is red or blue. If it is blue, then make it red, if it is red, make it blue. Also check or the blip actually exists and put the timer on 1500 seconds (=1,5 seconds) and put it on unlimited repeats (=0). Link to comment
Dzsozi (h03) Posted June 13, 2014 Author Share Posted June 13, 2014 I don't know how to make it, I've started it, but I realised that it's not going to work. Here's what I started to make, but I don't know how to finish it, or how to make it working. blue = 5, 120, 250 red = 255, 0, 0 function checkColor() if blue then createBlip ( x, y, z 0, 2, red, 255, 0, 150) elseif red then createBlip ( x, y, z 0, 2, blue, 255, 0, 150) end end setTimer ( checkColor, 1500, 0 ) Link to comment
Spajk Posted June 14, 2014 Share Posted June 14, 2014 -- create a blue blip local blip = createBlip ( x, y, z 0, 2, 5, 120, 250) local color = false function checkColor() if color then setBlipColor(blip, 5, 120, 250) else setBlipColor(blip, 255, 0, 0) end color = not color end setTimer ( checkColor, 1500, 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