Jump to content

هيلب في كود


+Source|>

Recommended Posts

getIDFromName = ?

جرب كذا :

addEventHandler ( 'onPlayerDamage', root, function ( atk, atkwp, bodypart, attacker )
if ( atkwp == 34 and bodypart == 9 )
    outputChatBox ( 'Head Shot', source, 255, 0, 0, true )
        setElementHealth ( source, 0 )
    end
end )

 

Edited by #,+( _xiRoc[K]; >
Link to comment
20 minutes ago, #,+( _xiRoc[K]; > said:

#edit :

اذا كنت تبي بس السنايبر هيد شوت جرب كذا :


addEventHandler ( 'onPlayerDamage', root, function ( atk, atkwp, bodypart, loss )
if ( atkwp == 34 ) then
    if ( bodypart == 9 )
        outputChatBox ( 'Head Shot', source, 255, 0, 0, true )
            setElementHealth ( source, 0 )
        end
    else
        setElementHealth ( source, getElementHealth ( source ) + loss )
    end
end )

يعطيك العافيه

Link to comment
1 minute ago, Source|> said:

يعطيك العافيه

تعديل بسيط :

addEventHandler ( 'onPlayerDamage', root, function ( atk, atkwp, bodypart, loss )
if ( atkwp == 34 ) then
    if ( bodypart == 9 )
        outputChatBox ( 'Head Shot', source, 255, 0, 0, true )
            setElementHealth ( source, 0 )
        end
    else
        if ( bodypart == 9 ) then 
            setElementHealth ( source, getElementHealth ( source ) + loss )
        end
    end
end )

 

  • Like 2
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...