Jump to content

Flashing blip


Recommended Posts

Posted

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?

Your signature image is too large.

Removed

Posted

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 ) 
  

Your signature image is too large.

Removed

Posted
-- 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 ) 
  

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...