Garry's Mod Wiki

Player:SetTeam

Player:SetTeam( number Team )

Description

Sets the player to the chosen team.

Arguments

1 number Team
The team that the player is being set to.

Example

Sets the players team to the first argument when writing "set_team" into the console and respawns the player afterwards, ex. "set_team 1".

concommand.Add( "set_team", function( ply, cmd, args ) local Team = args[1] or 1 ply:SetTeam( Team ) ply:Spawn() end )
Output: Sets the player to team 1 and respawns them.

Page Links


Special Pages


Wikis

?

Render Time: 39ms

DB GetPage 4
Generate Html 3
SaveChanges (1) 15
Render Body 0
Render Sidebar 14