Chaos Posted June 21, 2013 Posted June 21, 2013 hi, i have problem with friendlyfire when a player use weapons Cause fires like flame or rpg the other wise will dead due to fire. for _, v in ipairs ( getElementsByType 'team' ) do setTeamFriendlyFire ( v, false ) end
iPrestege Posted June 21, 2013 Posted June 21, 2013 hi, i have problem with friendlyfire when a player use weapons Cause fires like flame or rpg the other wise will dead due to fire. for _, v in ipairs ( getElementsByType 'team' ) do setTeamFriendlyFire ( v, false ) end getElementsByType ( 'team' )
Chaos Posted June 21, 2013 Author Posted June 21, 2013 the friendlyfire works fine plz read the topic
Chaos Posted June 21, 2013 Author Posted June 21, 2013 when a player use weapon like flame the other players will burning and then will dead and the friendlyfire is on
ixjf Posted June 21, 2013 Posted June 21, 2013 hi, i have problem with friendlyfire when a player use weapons Cause fires like flame or rpg the other wise will dead due to fire. for _, v in ipairs ( getElementsByType 'team' ) do setTeamFriendlyFire ( v, false ) end getElementsByType ( 'team' ) What's the difference..?
PaiN^ Posted June 21, 2013 Posted June 21, 2013 addEventHandler( "onClientPlayerDamage", root, function( attacker, weapon ) if attacker and getElementType( attacker ) == "player" and attacker ~= source then local aTeam = getPlayerTeam( attacker ) local sTeam = getPlayerTeam( source ) if sTeam ~= false and sTeam == aTeam then cancelEvent( ) end end end ) Try this
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now