ZeyadGTX Posted September 18, 2014 Posted September 18, 2014 I drawn This Pic in my hud but i was asking can i make it rotates 360 Degrees And keep rotating ! dxDrawImage((840/1024)*sWidth, (80/768)*sHeight, (32/1024)*sWidth, (32/768)*sHeight, "heart.png") My nick in MTA is Spider
MIKI785 Posted September 18, 2014 Posted September 18, 2014 The next parameter after "image" is actually the rotation.. Check dxDrawImage. Lua Scripter Owner of mshost.cz MTA portal.
Anubhav Posted September 19, 2014 Posted September 19, 2014 rot = 50 addEventHandler("onClientRender", root, function() if rot > 360 then state = 1 else state = 2 end if state ==1 then rot = rot-5 else rot = rot+5 end end ) dxDrawImage((840/1024)*sWidth, (80/768)*sHeight, (32/1024)*sWidth, (32/768)*sHeight, "heart.png", rot) Not realy sure but shud worok See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
#DRAGON!FIRE Posted September 19, 2014 Posted September 19, 2014 rot = 50 addEventHandler("onClientRender", root, function() if rot > 360 then state = 1 else state = 2 end if state ==1 then rot = rot-5 else rot = rot+5 end end ) dxDrawImage((840/1024)*sWidth, (80/768)*sHeight, (32/1024)*sWidth, (32/768)*sHeight, "heart.png", rot) Not realy sure but shud worok why ? not need for this ! just create a var in start and make it like this rot = rot + 3 To Contact Me at Skype : [email protected]
Saml1er Posted September 19, 2014 Posted September 19, 2014 1st method. local speed ,start = 4,getTickCount() addEventHandler("onClientRender", root, function() local rot = (((start - getTickCount())/1000)/60)/speed --[[ if you multiply speed with - 1 ( speed * -1 ) then the image might start rotating clockwise or anti-clockwise.]] dxDrawImage((840/1024)*sWidth, (80/768)*sHeight, (32/1024)*sWidth, (32/768)*sHeight, "heart.png", rot) end ) 2nd method. local rot = 0 addEventHandler("onClientRender", root, function() local rot = rot + 0.1 dxDrawImage((840/1024)*sWidth, (80/768)*sHeight, (32/1024)*sWidth, (32/768)*sHeight, "heart.png", rot) end )
ZeyadGTX Posted September 19, 2014 Author Posted September 19, 2014 Thanks Guys I fixed it My nick in MTA is Spider
Anubhav Posted September 19, 2014 Posted September 19, 2014 Thanks Guys I fixed it No problem. See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now