addEventHandler ( "onClientRender", root,
function ( )
local id = getElementID ( v )
if id then
if string.find(id,"flasher") then
local speed = string.gsub(id,"flasher","")
local tick = getTickCount()/tonumber(speed)/1000
local color = math.abs(math.sin(-tick))
guiSetAlpha(v, color)
end
end
end
)
function setFlasherLabel ( label, speed )
if label then
if not isElement ( label ) then return end
if not tonumber(speed) then speed = 1 end
setElementID ( label, "flasher"..speed )
end
end
GUIEditor = {
staticimage = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.staticimage[1] = guiCreateStaticImage(1191, 621, 185, 121, "tara.png", false)
setFlasherLabel ( GUIEditor.staticimage[1] )
end
)
لو تبحث شوي بتلاقي تنطيل مسوي وظيفه
setElementFlasher
عالعموم تفضل