Recommended Posts

Eu estou fazendo uma hud, coloquei as estrelas de procurado. Porém as estrelas não ficam amarela.

   if procurado == 1 then

      dxDrawImage(1543, 47, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
    end
    if procurado == 2 then

       dxDrawImage(1543, 47, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
        dxDrawImage(1543, 78, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
    end
    if procurado == 3 then
 
       dxDrawImage(1543, 47, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
    dxDrawImage(1543, 78, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
        dxDrawImage(1543, 110, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
    end
    if procurado == 4 then

       dxDrawImage(1543, 47, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
        dxDrawImage(1543, 78, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
        dxDrawImage(1543, 110, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
        dxDrawImage(1543, 142, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
    end
    if procurado == 5 then

       dxDrawImage(1543, 47, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
        dxDrawImage(1543, 78, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
        dxDrawImage(1543, 110, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
        dxDrawImage(1543, 142, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
        dxDrawImage(1543, 174, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
    end
    if procurado == 6 then

        dxDrawImage(1543, 47, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
        dxDrawImage(1543, 78, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
        dxDrawImage(1543, 110, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
        dxDrawImage(1543, 142, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
        dxDrawImage(1543, 174, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
        dxDrawImage(1543, 206, 24, 26, ":Hud_BvM/imgs/star.png", 0, 0, 0, tocolor(255,255,0, alpha), false)
    end 

 

Share this post


Link to post

@alowner Por favor, evite postar em português na seção internacional e use o local do fórum correto que deve ser: Other languages > Portuguese / Português > Programação em Lua

Senão terei que sempre mover seus posts para a seção certa.

Sobre o problema:

Faça com if elseif.

if procurado == 1 then

elseif procurado == 2 then

--etc

end

Verifique se as imagens estão funcionando e o valor 'alpha' está definido.

Share this post


Link to post

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.