Revision Difference
Player:SetTeam#512464
<function name="SetTeam" parent="Player" type="classfunc">⤶
<description>Sets the player to the chosen team.</description>⤶
<realm>Server</realm>⤶
<args>⤶
<arg name="Team" type="number">The team that the player is being set to.</arg>⤶
</args>⤶
</function>⤶
⤶
<example>⤶
<description>Sets the players team to the first argument when writing "set_team" into the console and respawns the player afterwards, ex. "set_team 1".</description>⤶
<code>⤶
function ChangeMyTeam( ply, cmd, args )⤶
ply:SetTeam( args[1] )⤶
ply:Spawn()⤶
end⤶
concommand.Add( "set_team", ChangeMyTeam )⤶
</code>⤶
<output>Sets the player to team 1 and respawns him/her.</output>⤶
⤶
</example>