Skip to content

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

  • color integer|nil — 0xRRGGBB, string|nil err

Team:friendly_fire ​

Returns friendly_fire boolean|nil, err string|nil

Team:set_name ​

Parameters

  • name string — 1..64 bytes, no control characters

Returns ok boolean|nil, err string|nil

Team:set_color ​

Parameters

  • color integer — 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_fire boolean

Returns ok boolean|nil, err string|nil

Team:players ​

Returns the members in id order.

Returns players Player[]|nil, err string|nil

Documentation licensed under CC BY 4.0. DarqlineMP is not affiliated with Rockstar Games or Take-Two Interactive. Grand Theft Auto is a trademark of Take-Two Interactive Software, Inc.