setTeamFriendlyFire
Client-side
Server-side
Shared
Pair: getTeamFriendlyFire
This page is incomplete! Help wanted!
Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.
This function sets the friendly fire value for the specified team.
Syntax
setTeamFriendlyFire ( )Code Examples
server
This example checks if friendly fire is on for every team, and toggles it on if it isn't.
-- get a table with all teamslocal 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 ) endend