Jump to content

dxDrawImage continuous rotation?


Recommended Posts

Hey can somebody help me, how to make this image has a continuous rotation e.e

My code:

local sX, sY = guiGetScreenSize() 
local rot = 1 
rot = rot+1 
  
function ResetAngle() 
if ( rot == 360 ) then 
    rot = 0 
    end 
end 
  
function DrawTheSymbol() 
dxDrawImage (655, 25, 113, 122, "timer.png",rot,0,0) 
end 
addEventHandler("onClientRender", getRootElement(), DrawTheSymbol) 

Link to comment

Try this:

local sX, sY = guiGetScreenSize() 
local rot = 0 
  
function DrawTheSymbol() 
    if ( rot >= 360 ) then 
        rot = 0 
    end 
    rot = rot + 1 
    dxDrawImage (655, 25, 113, 122, "timer.png",rot,0,0) 
end 
addEventHandler("onClientRender", getRootElement(), DrawTheSymbol) 

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