player_manager.SetPlayerClass

From Garry's Mod
Jump to: navigation, search
 player_manager.SetPlayerClass( )

Contents

Description

Sets a player's class

Arguments

Player ply

Player to set class

Arguments

string classname

Name of class to set

Examples

Example

Sets the player's class to 'player_default' every time they spawn

function GM:PlayerSpawn( ply )
 player_manager.SetPlayerClass(ply, "player_default")
end


Personal tools
Navigation