Jump to content

dxDrawImage continuous rotation?


Recommended Posts

Posted

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) 

"El conocimiento jamás debe detenerse, por que es lo único que nos salvará cuando no nos quede más".

Att: -|TG|-Mister[Q]<.

Posted

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) 

Skype: HackerlLinux

¿Quieres aprender scripting para MTA? - http://www.scriptingmtasa.wordpress.com

"La disciplina es la clave del exito"

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