Gamemode.PlayerCanJoinTeam

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NamePlayerCanJoinTeam
SyntaxGM:PlayerCanJoinTeam( Player Player )
DescriptionReturn true to allow a player to join a team.
ReturnsBoolean
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.PlayerCanJoinTeam]Gamemode.PlayerCanJoinTeam [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionAllows for only admins to join a team.
Used onNewerServer.png
Code
function GM:PlayerCanJoinTeam( ply )
    return ply:IsAdmin( )
end
OutputOnly admins can join a team.


See also


Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox