A3kri Posted August 6, 2012 Share Posted August 6, 2012 Hello , how do I make friendly fire ? people in the same team keep killing each other I tried -- get a table with all teams local allTeams = getElementsByType ( "team" ) -- for every team, for index, theTeam in ipairs(allTeams) do -- if friendly fire is off, if ( getTeamFriendlyFire ( theTeam ) == false ) then -- switch it on setTeamFriendlyFire ( theTeam, true ) end end but it doesn't work .. Link to comment
Tete omar Posted August 6, 2012 Share Posted August 6, 2012 You copied the example , but this should work, maybe you put it client side. Link to comment
TAPL Posted August 6, 2012 Share Posted August 6, 2012 for _, team in ipairs(getElementsByType("team")) do if getTeamFriendlyFire(team) then setTeamFriendlyFire(team, false) end end Link to comment
A3kri Posted August 7, 2012 Author Share Posted August 7, 2012 none worked .. I tried both .. fiendly.lua and in the meta I imported them as server Link to comment
Tete omar Posted August 7, 2012 Share Posted August 7, 2012 do not copy the examples without knowledge how is this thing work, you have to learn lua , not copy the examples Link to comment
TAPL Posted August 7, 2012 Share Posted August 7, 2012 none worked ..I tried both .. fiendly.lua and in the meta I imported them as server Dude start the script after creating the teams. 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