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
PaiN^ Posted June 21, 2013 Posted June 21, 2013 I didn't understand . " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
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..? I used to know how to code, but then I took an arrow in the knee. Project Redivivus - Remaking Old School MTA With New Code MTA 0.6 Nightly 1 released
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 " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
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