Jump to content

[AJUDA] Barra dx


Recommended Posts

Quero que quando apertar uma tecla e a barra estiver um uma posição específica ele execute outra função
gostaria de saber como fazer para saber quando a barra estiver na area do alvo

Essa é a forma que estou fazendo a barra :

local screenW, screenH = guiGetScreenSize() local painel = false
 
function hacking()	
	barra = interpolateBetween(0, 0, 0, 0.1695, 0, 0, (getTickCount()-tick)/3000, "Linear") 
    dxDrawRectangle(screenW * 0.4156, screenH * 0.7139, screenW * 0.1695, screenH * 0.0444, tocolor(0, 0, 0, 180), false)
   	dxDrawRectangle(screenW * 0.4742, screenH * 0.7139, screenW * 0.0109, screenH * 0.0444, tocolor(255, 255, 255, 180), false) -- Alvo
	dxDrawRectangle(screenW * 0.4156, screenH * 0.7139, screenW * barra, screenH * 0.0444, tocolor(0, 255, 0, 255), false)
end

function starting ()
tick = getTickCount()
if painel == false then
  addEventHandler ( "onClientRender", root, hacking )
  painel = true
  else
  painel = false
  removeEventHandler ( "onClientRender", root, hacking )
end
end
addCommandHandler("iniciar",starting)

 

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