Jump to content

Image Effect


BorderLine

Recommended Posts

Hi forum :)

Well i have a question, someone know what is the effect of image.

I dont know if someone has played basemode.

When join show the tittle image with a effect. i dont know if im explain

is a fuction?

or i need draw image with diferents positions showing for 0.2 ms and deleting after to show

Thanks so much

Link to comment

this well Make the image swing form left to right :)

local rootElement = getRootElement() 
local screenWidth,screenHeight = guiGetScreenSize() 
  
  
function renderDisplay ( ) 
    local seconds = getTickCount() / 1000 
    local angle = math.sin(seconds) * 80 
    dxDrawImage ( screenWidth/2 - 50, 0, 100, 240, 'YourImage.png', angle, 0, -120 ) 
end 
  
  
function HandleTheRendering ( ) 
    addEventHandler("onClientRender",rootElement, renderDisplay) 
end 
addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering) 

Link to comment

Copying a wiki example I see...

  
local screenWidth, screenHeight = guiGetScreenSize() 
  
local function drawAnimatedImage( ) 
    local seconds = getTickCount() / 1000 
    local angle = math.sin(seconds) * 80 
    dxDrawImage ( screenWidth/2 - 50, 0, 100, 240, 'YourImage.png', angle, 0, -120 ) 
end 
addEventHandler("onClientRender", root, drawAnimatedImage) 
  

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