#RooTs Posted January 14, 2016 Posted January 14, 2016 (edited) hello guys, I'm new with the "dxDrawImage Section". and I am not able to do the calculation, to eat the image from top to bottom Solved please. keep function roundValue(screenWidth - 30), roundValue(screenHeight - 270) local valor = getVehicleNitroLevel(vehicle) dxDrawImageSection(roundValue(screenWidth - 30), roundValue(screenHeight - 270), 26, valor*-1, 0, 0, 26, valor*-1, "image/nitrolevel.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) Edited January 15, 2016 by Guest
tosfera Posted January 15, 2016 Posted January 15, 2016 You're currently only decreasing the hight frm the image, you should also move the Y axis as in the position so it stays sticky to the bottom, yet gets decreased. Try something like this; local valor = getVehicleNitroLevel(vehicle) dxDrawImageSection(roundValue(screenWidth - 30), roundValue(screenHeight - 270) + valor, 26, valor*-1, 0, 0, 26, valor*-1, "image/nitrolevel.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
#RooTs Posted January 15, 2016 Author Posted January 15, 2016 You're currently only decreasing the hight frm the image, you should also move the Y axis as in the position so it stays sticky to the bottom, yet gets decreased. Try something like this; local valor = getVehicleNitroLevel(vehicle) dxDrawImageSection(roundValue(screenWidth - 30), roundValue(screenHeight - 270) + valor, 26, valor*-1, 0, 0, 26, valor*-1, "image/nitrolevel.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) no work
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