Jump to content

[SOLVED] problem with dxDrawImageSection


#RooTs

Recommended Posts

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 by Guest
Link to comment

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) 

Link to comment
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 :cry:

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