Revision Difference
player_manager.RegisterClass#524884
<function name="RegisterClass" parent="player_manager" type="libraryfunc">
<description>Register a class metatable to be assigned to players later</description>
<realm>Shared</realm>
<args>
<arg name="name" type="string">Class name</arg>
<arg name="table" type="table">Class metatable</arg>
<arg name="base" type="string">Base class name</arg>
</args>
</function>
<example>
<description>A quick look at registering a class table</description>
<code>
local PLAYER = {}
PLAYER.DisplayName = "Default Class"
⤶
...
⤶
-- ...
player_manager.RegisterClass( "player_default", PLAYER, nil )
</code>
</example>
<example>
<description>You can retrieve the data you've set when registering the table using baseclass.Get( "<classname>" )</description>
<code>PrintTable(baseclass.Get( "player_default" ))</code>
<code>PrintTable( baseclass.Get( "player_default" ) )</code>
<output>
<br>Walkspeed = 300<br>⤶
RunSpeed = 500<br>⤶
CalcView = function: 0x00665988<br>⤶
UseVMHands = true<br>⤶
etc...⤶
```⤶
Walkspeed = 300⤶
RunSpeed = 500⤶
CalcView = function: 0x00665988⤶
UseVMHands = true⤶
--- etc...⤶
```⤶
</output>
</example>