Jump to content

Ajuda sobre inventario


Recommended Posts

ja tem isso na funcao e porq o codigo e grande e eu coloquei apenas o da arma

function botoes ( _,state )
    if DX_Inventario == true then
        if state == "down" then
            if Posicao_Mouse_Inventario(x*440, y*320, x*180, y*35) then --Armas
			    playSound("sounds/click.mp3", false)
                addEventHandler("onClientRender", root, armas)
				removeEventHandler ( "onClientRender", getRootElement(), alimentos )
				removeEventHandler ( "onClientRender", getRootElement(), utilitarios )
				removeEventHandler ( "onClientRender", getRootElement(), outros )
				if Posicao_Mouse_Inventario(x*445, y*445, x*80, y*20) then -- img 1
			        playSound("sounds/click.mp3", false)
				end
            end
        end
    end
  addEventHandler("onClientClick", root, botoes)

Ela esta assim ali quando clico em armas ele vai na aba armas o img 1 e quando clico na imagem na aba armas mais nao esta funcionando, o player sound e so um teste pra ve se o botao ta funcionando saca 

Edited by LucasMTA
Link to comment

tente:

 

function botoes ( _,state )
    if DX_Inventario == true then
        if state == "down" then
            if Posicao_Mouse_Inventario(x*440, y*320, x*180, y*35) then --Armas
			    playSound("sounds/click.mp3", false)
                addEventHandler("onClientRender", root, armas)
				removeEventHandler ( "onClientRender", getRootElement(), alimentos )
				removeEventHandler ( "onClientRender", getRootElement(), utilitarios )
				removeEventHandler ( "onClientRender", getRootElement(), outros )
        end
				if Posicao_Mouse_Inventario(x*445, y*445, x*80, y*20) then -- img 1
			        playSound("sounds/click.mp3", false)
				end
            end
        end
    end
  addEventHandler("onClientClick", root, botoes)

 

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