Jump to content

طلب تصحيح كود سهل


Recommended Posts

آلسلام عليكم 

في صورة بآلسيرفر تحت علي آليسآر

 

ذآ آلكود يخلي آلصورة تنور وتطفي في نفس آلثآنية كآنهآ فلشر سريع

لكن للآسف جربت آلكود مآ آشتغل

ممكن آحد يقولي آلخطآ آو يصلح آلكود

# وشكرآ مقدمآ

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
)

آلكود من آلآخ ميزو#

Link to comment
GUIEditor = {staticimage = {}} ; 
addEventHandler("onClientResourceStart", resourceRoot,function() 
GUIEditor.staticimage[1] = guiCreateStaticImage(1191, 621, 185, 121, "tara.png", false)    
end ) ; 

addEventHandler ( "onClientRender", root,  function ( )     
if ( isElement ( GUIEditor.staticimage[1] ) and guiGetVisible ( GUIEditor.staticimage[1] ) ) then
local tick = getTickCount()/1/1000 
local alpha = math.abs(math.sin(-tick))              
guiSetAlpha(GUIEditor.staticimage[1], alpha) 
end 
end ) ; 

 

Link to comment
2 minutes ago, Default#^ said:

GUIEditor = {staticimage = {}} ; 
addEventHandler("onClientResourceStart", resourceRoot,function() 
GUIEditor.staticimage[1] = guiCreateStaticImage(1191, 621, 185, 121, "tara.png", false)    
end ) ; 

addEventHandler ( "onClientRender", root,  function ( )     
if ( isElement ( GUIEditor.staticimage[1] ) and guiGetVisible ( GUIEditor.staticimage[1] ) ) then
local tick = getTickCount()/1/1000 
local alpha = math.abs(math.sin(-tick))              
guiSetAlpha(GUIEditor.staticimage[1], alpha) 
end 
end ) ; 

 

تسلم آخوي مآ قصرت <3

+ يآريت لو ترد خآص

@Default#^

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