Garry's Mod Wiki

player_manager

The player_manager library lets you manage players, such as setting their models or creating player classes.

Methods

player_manager.AddValidHands( string name, string model, number skin, string bodygroups )
Assigns view model hands to player model.
player_manager.AddValidModel( string name, string model )
Associates a simplified name with a path to a valid player model. Only used internally.
player_manager.AllValidModels()
Returns the entire list of valid player models.
player_manager.ClearPlayerClass( Player ply )
Clears a player's class association by setting their ClassID to 0
string player_manager.GetPlayerClass( Player ply )
Gets a players class
table player_manager.GetPlayerClasses()
Retrieves a copy of all registered player classes.
player_manager.OnPlayerSpawn( Player ply )
Applies basic class variables when the player spawns. Called from GM:PlayerSpawn in the base gamemode.
player_manager.RegisterClass( string name, table table, string base )
Register a class metatable to be assigned to players later
vararg player_manager.RunClass( Player ply, string funcName, vararg arguments )
Execute a named function within the player's set class
player_manager.SetPlayerClass( Player ply, string classname )
Sets a player's class
table player_manager.TranslatePlayerHands( string name )
Retrieves correct hands for given player model. By default returns citizen hands.
string player_manager.TranslatePlayerModel( string shortName )
Returns the valid model path for a simplified name.
string player_manager.TranslateToPlayerModelName( string model )
Returns the simplified name for a valid model path of a player model. Opposite of player_manager.TranslatePlayerModel.

Page Links


Special Pages


Wikis

?

Render Time: 39ms

DB GetPage 5
Generate Html 2
SaveChanges (1) 18
Render Body 0
Render Sidebar 12