Team
A team owned by the resource that created it (removed when that resource stops; its members are left without a team). The name is metadata for the gamemode. The color is used for its members' nametags and player list entries, unless Player:set_color set one. Reads and writes on a removed team return nil, err.
Team:id
Returns id integer
Team:name
Returns name string|nil, err string|nil
Team:color
Returns
colorinteger|nil— 0xRRGGBB, string|nil err
Team:friendly_fire
Returns friendly_fire boolean|nil, err string|nil
Team:set_name
Parameters
namestring— 1..64 bytes, no control characters
Returns ok boolean|nil, err string|nil
Team:set_color
Parameters
colorinteger— 0xRRGGBB
Returns ok boolean|nil, err string|nil
Team:set_friendly_fire
With friendly fire off, members deal no damage of any kind to each other and cannot stealth kill each other; player_damage does not fire and a teammate is never the killer. Self-inflicted and environmental damage still count. Vehicles are not protected: a vehicle blown up by a teammate still kills its occupants, with no killer.
Parameters
friendly_fireboolean
Returns ok boolean|nil, err string|nil
Team:players
Returns the members in id order.
Returns players Player[]|nil, err string|nil
