Jump to content

Help


231

Recommended Posts

setTimer(function() 
for ,player in ipairs(getElementsByType("player")) do
for ,blip in ipairs(getElementsByType("blip")) do
if createBlipAttachedTo ( blip ) then
    getBlipColor ( blipValue ) 
    else
    setBlipColor ( blip, 0, 0, 0, 255 ) 
end, 5000 ) 
bindKey( "4", "down" ))

Lua:2: "<name>" expected near ","

Link to comment
44 minutes ago, 231 said:

I was thinking if is it possible to make the square blip flashing

 

Try this:

local alpha = 100

function refreshColor()
	for _, blip in ipairs(getElementsByType("blip")) do
		if (getBlipIcon(blip) == 0) then
			alpha = alpha + 10
			if (alpha >= 254) then
				alpha = 100
			end
			local r, g, b = getBlipColor(blip)
			setBlipColor(blip, r, g, b, alpha)
		end
	end
end
setTimer(refreshColor, 50, 0)

 

Link to comment

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...