Garry's Mod Wiki

GM:PlayerClassChanged

  GM:PlayerClassChanged( Player ply, number newID )

Description

This is used internally - although you're able to use it you probably shouldn't.

Called whenever a player's class is changed on the server-side with player_manager.SetPlayerClass.

Arguments

1 Player ply
The player whose class has been changed.
2 number newID
The network ID of the player class's name string, or 0 if we are clearing a player class from the player.

Pass this into util.NetworkIDToString to retrieve the proper name of the player class.