Jump to content

podria poner gif ?


AlvareZ_

Recommended Posts

ams les muestro un ejemplo de mi gif con la funcion de solid :P

  
  
function dxDrawGifImage ( x, y, w, h, path, iStart, iType, effectSpeed ) 
    local gifElement = createElement ( "dx-gif" ) 
    if ( gifElement ) then 
        setElementData ( 
            gifElement, 
            "gifData", 
            { 
                x = x, 
                y = y, 
                w = w, 
                h = h, 
                imgPath = path, 
                startID = iStart, 
                imgID = iStart, 
                imgType = iType, 
                speed = effectSpeed, 
                tick = getTickCount ( ) 
            } 
        ) 
        return gifElement 
    else 
        return false 
    end 
end 
  
addEventHandler ( "onClientRender", root, 
    function ( ) 
        local currentTick = getTickCount ( ) 
        for index, gif in ipairs ( getElementsByType ( "dx-gif" ) ) do 
            local gifData = getElementData ( gif, "gifData" ) 
            if ( gifData ) then 
                if ( currentTick - gifData.tick >= gifData.speed ) then 
                    gifData.tick = currentTick 
                    gifData.imgID = ( gifData.imgID + 1 ) 
                    if ( fileExists ( gifData.imgPath .."".. gifData.imgID ..".".. gifData.imgType ) ) then 
                        gifData.imgID = gifData.imgID 
                        setElementData ( gif, "gifData", gifData ) 
                    else 
                        gifData.imgID = gifData.startID 
                        setElementData ( gif, "gifData", gifData ) 
                    end 
                end 
                dxDrawImage ( gifData.x, gifData.y, gifData.w, gifData.h, gifData.imgPath .."".. gifData.imgID ..".".. gifData.imgType ) 
            end 
        end 
    end 
) 
          
gif = dxDrawGifImage ( -20, 450, 105, 75, "img/logo", 1, "png", 50 ) 
  

el meta :

    "ElMota" name="logo" version="0.1" type="script"/> 
    

Link to comment
  • Recently Browsing   0 members

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