Jump to content

تعديل كود خفيف


Recommended Posts

آلسلام عليكم

دآ كود يجي صورة بآلسيرفر من تحت علي آليمين 

 

آبي آلصورة تنطفي وتنور تنطفي وتنور كآنهآ تروح وتيجي بس في نفس آلثآنية ممكن آحد يعدلي آلكود ويسويهآ؟

--[[-------------------------------------------------
Notes:

> This code is using a relative image filepath. This will only work as long as the location it is from always exists, and the resource it is part of is running.
    To ensure it does not break, it is highly encouraged to move images into your local resource and reference them there.
--]]-------------------------------------------------


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

 

وشكرآ له آكيد

Link to comment
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

عالعموم تفضل

Link to comment
29 minutes ago, Me[Z]oO said:

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

عالعموم تفضل

شكرآ علي تعبك لكن للآسف مآ آشتغل

 

هل آلخطآ مني ولآ منك ؟

@Me[Z]oO

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