OnJoinTeam||doc136894

September 20, 2022

Format

local event = Entity:GetEvent("OnJoinTeam")

Description

Triggered event when entity joins team.

Callback function parameters

Type Name Introduction
Entity entity Entity that joined team
int teamID Team ID joined

Code Example

local event = Event:GetEvent("OnJoinTeam")
event:Bind(function(entity, teamID)
    print(entity.. " join team " .. teamID)
end)