Jump to content

Ajuda sobre inventario


Recommended Posts

Posted (edited)

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
Posted

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)

 

Posted

Já foi resolvido, obrigado por quem ajudou ... alguém poderia me ajudar como protejo meu script para funcionar somente em um servidor especifico "ip" 

  • Moderators
Posted

Isso aí já é outra dúvida.

Recomendo que crie outro post.

Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanksspacer.png

Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile
Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment
Discord Oficial do MTA: https://mtasa.com/discord
Blacklist e Whitelist de Scripters: Planilha

Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.

Posted

Ok, mais acho que já existe essa postagem ne, ai no caso seria inutiu eu postar ia so acumular mais postagens nao sei posso estar errado , mais msm assim obg 

  • Moderators
Posted

Dai depende.

Se a postagem já existe, ela provavelmente já está respondida lá, certo?

Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanksspacer.png

Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile
Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment
Discord Oficial do MTA: https://mtasa.com/discord
Blacklist e Whitelist de Scripters: Planilha

Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.

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