Jump to content

Bug sniper


Recommended Posts

Posted

Estou tendo esse problema ao mirar com a sniper . 
Esse erro ocorre no meu servidor de DayZ .

 

Me indicarao  essa função . 

bindKey ( 'aim_weapon', 'both', 
    function ( _, state ) 
        if getPedWeaponSlot ( localPlayer ) == 6 then 
        if ( state == 'down' ) then 
            alpha = 0 
        elseif ( state == 'up' ) then 
        alpha = 255 
    end 
    for _, v in ipairs ( getElementsByType ( 'object', root, true ) ) do 
        if isElementAttachedToBone ( v ) then 
            local id = getElementModel ( v ) 
                if ( id == 1867 ) then 
                    setElementAlpha ( v, alpha ) 
                elseif ( id == 1868 ) then
                    setElementAlpha ( v, alpha )
                elseif ( id == 1869 ) then
                    setElementAlpha ( v, alpha )
                elseif ( id == 1869 ) then
                    setElementAlpha ( v, alpha )
                elseif ( id == 1870 ) then
                    setElementAlpha ( v, alpha )
                elseif ( id == 1871 ) then
                    setElementAlpha ( v, alpha )
                elseif ( id == 1872 ) then
                    setElementAlpha ( v, alpha )
                elseif ( id == 1873 ) then
                    setElementAlpha ( v, alpha )
                elseif ( id == 1874 ) then
                    setElementAlpha ( v, alpha )
                elseif ( id == 1875 ) then
                    setElementAlpha ( v, alpha )
                end 
            end 
        end 
    end 
end 
)

Mais não esta funcionando .

alguem pode me ajudar pf ?
VcRa5J8.png

Profile:
https://forum.mtasa.com/profile/64927-l0kzeratv/
Discord:
L0KZERA#4963

  • Moderators
Posted (edited)

Use a ferramenta <> do fórum para postar seu script.

bLankbMBQZKXC6j0YcADtg.png

Edited by Lord Henry

Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! spacer.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
45 minutes ago, Lord Henry said:

Use a ferramenta <> do fórum para postar seu script.

bLankbMBQZKXC6j0YcADtg.png

bindKey ( 'aim_weapon', 'both', 
    function ( _, state ) 
        if getPedWeaponSlot ( localPlayer ) == 6 then 
        if ( state == 'down' ) then 
            alpha = 0 
        elseif ( state == 'up' ) then 
        alpha = 255 
    end 
    for _, v in ipairs ( getElementsByType ( 'object', root, true ) ) do 
        if isElementAttachedToBone ( v ) then 
            local id = getElementModel ( v ) 
                if ( id == 1867 ) then 
                    setElementAlpha ( v, alpha ) 
	            elseif ( id == 1868 ) then
                    setElementAlpha ( v, alpha )
				elseif ( id == 1869 ) then
                    setElementAlpha ( v, alpha )
				elseif ( id == 1869 ) then
                    setElementAlpha ( v, alpha )
				elseif ( id == 1870 ) then
                    setElementAlpha ( v, alpha )
				elseif ( id == 1871 ) then
                    setElementAlpha ( v, alpha )
				elseif ( id == 1872 ) then
                    setElementAlpha ( v, alpha )
				elseif ( id == 1873 ) then
                    setElementAlpha ( v, alpha )
				elseif ( id == 1874 ) then
                    setElementAlpha ( v, alpha )
				elseif ( id == 1875 ) then
                    setElementAlpha ( v, alpha )
	            end 
            end 
        end 
    end 
end 
)

 

Profile:
https://forum.mtasa.com/profile/64927-l0kzeratv/
Discord:
L0KZERA#4963

  • Moderators
Posted

A função isElementAttachedToBone não existe e também não é uma função nativa do MTA.

Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! spacer.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.

  • Moderators
Posted (edited)

Essa função ela é exportada pelo resource bone_attach, você deve ter esse resource funcionando no seu servidor para funcionar.

Para importar funções de outros resources, use call.

Edited by Lord Henry

Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! spacer.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.

  • 11 months later...

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