GM/PlayerRequestTeam

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
 
{{Hook
 
{{Hook
 
|Description=Request a player to join the team. This function will check if the team is available to join or not.
 
|Description=Request a player to join the team. This function will check if the team is available to join or not.
 +
 
This hook is called when the player runs "changeteam" in the console.
 
This hook is called when the player runs "changeteam" in the console.
  

Latest revision as of 06:27, 21 March 2017

 GM:PlayerRequestTeam( )

Description

Request a player to join the team. This function will check if the team is available to join or not.

This hook is called when the player runs "changeteam" in the console.

To prevent the player from changing teams, see GM:PlayerCanJoinTeam

Arguments

Player ply

The player to try to put into a team

Arguments

number team

Team to put the player into if the checks succeeded
Personal tools
Navigation