Yes I know but I don't to make the image totally transpent, but I want to do a progressive transparancy.
But When I do
function HUD_onClientRender( )
if( showHealthArmour ) then
if( getTickCount()-TickCount <= 3000 ) then
-- la on affiche ces putains d'images
dxDrawImage ( 0, 0, 960, 540, "./ressources/gfx/hud.bmp" )
elseif( getTickCount()-TickCount >= 4000 ) then
showHealthArmour = false
founduTick = nil
else
if( founduTick == nil ) then
founduTick = getTickCount( )
end
-- Ici on fais notre fondu
local transp = math.floor( ( 255 - ( ( (getTickCount()-founduTick)/ 1000 ) * 100 ) * ( 255 / 100 ) ) ) *256^3 + 0xffffff
dxDrawImage( 0, 0, 960, 540, "./ressources/gfx/hud.bmp", 0, 0, 0, transp )--transp )
end
end
end
addEventHandler ( "onClientRender", getRootElement( ), HUD_onClientRender )
the transparency work, but the color of the image change