Jump to content

sasuke78200

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by sasuke78200

  1. 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
  2. The image doesn't appear if I do that
  3. Hi guys, I want to make a transparency with an image. I've tested to change the color parameter but it doesn't work, if anyone can help me look my code: local transp = math.floor( ( ( (getTickCount()-founduTick)/ 1000 ) * 100 ) * ( 255 / 100 ) ) *256^3 + 0xffffff --outputChatBox ( "Image transp "..tostring( transp ) ) dxDrawImage( 0, 0, 960, 540, "./ressources/gfx/hud.bmp", 0, 0, 0, transp )
×
×
  • Create New...