BorderLine Posted January 28, 2012 Share Posted January 28, 2012 Hi forum well i was trying to make a healthbar with teamcolor i try this but the healthbar is black local health local r, g, b = getTeamColor( player ) health = getElementHealth ( player ) health = math.max(health, 0)/100 dxDrawImageSection(drawX, drawY, width, height, math.floor(256 - 256 * (health)), 0, 256, 16, "images/h1.png", 0, 0, 0, tocolor(r, g, b, 200)) thanks so much for your atention Link to comment
Castillo Posted January 28, 2012 Share Posted January 28, 2012 local team = getPlayerTeam(player) if (team) then r, g, b = getTeamColor( team ) else r, g, b = getPlayerNametagColor(player) end health = getElementHealth ( player ) health = math.max(health, 0)/100 dxDrawImageSection(drawX, drawY, width, height, math.floor(256 - 256 * (health)), 0, 256, 16, "images/h1.png", 0, 0, 0, tocolor(r, g, b, 200)) Link to comment
BorderLine Posted January 28, 2012 Author Share Posted January 28, 2012 working ! thx a loot solid Link to comment
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