Chaos Posted June 21, 2013 Share 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 Link to comment
iPrestege Posted June 21, 2013 Share 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' ) Link to comment
Chaos Posted June 21, 2013 Author Share Posted June 21, 2013 the friendlyfire works fine plz read the topic Link to comment
Chaos Posted June 21, 2013 Author Share 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 Link to comment
ixjf Posted June 21, 2013 Share 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..? Link to comment
PaiN^ Posted June 21, 2013 Share 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 Link to comment
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