Jump to content

Bug sniper


Recommended Posts

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

Link to comment
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 
)

 

Link to comment
  • Other Languages Moderators

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
  • Thanks 1
Link to comment
  • 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...