Skip to main content

TeamUtils

Team utility methods

Functions

areTeamMates

TeamUtils.areTeamMates(
playerAPlayer,
playerBPlayer
) → boolean

Returns whether the two players are on the same team

getTeam

TeamUtils.getTeam(playerPlayer) → Team?

Returns the team of the player, or nil if the player is neutral

Show raw api
{
    "functions": [
        {
            "name": "areTeamMates",
            "desc": "Returns whether the two players are on the same team",
            "params": [
                {
                    "name": "playerA",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "playerB",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 12,
                "path": "src/teamutils/src/Shared/TeamUtils.lua"
            }
        },
        {
            "name": "getTeam",
            "desc": "Returns the team of the player, or nil if the player is neutral",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Team?\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 25,
                "path": "src/teamutils/src/Shared/TeamUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "TeamUtils",
    "desc": "Team utility methods",
    "source": {
        "line": 6,
        "path": "src/teamutils/src/Shared/TeamUtils.lua"
    }
}