nut.class
Class System module.
Manages character classes with faction restrictions, limits, and join conditions. Think of classes like classes in TF2. You have 2 "factions", RED and BLU, and within each class are 9 classes. All are within the same team/faction, yet have special features unique to the class.
Functions
nut.class.loadFromDir (directory)
nut.class.loadFromDir
Internal
This is used internally - although you're able to use it you probably shouldn't.
Register classes from a directory.
Parameters:
string directory Path to scan for class filesnut.class.canBe (client, class)
nut.class.canBe
Determines if a player is allowed to join a specific class.
Parameters:
Client client Player attempting to joinnumber class Class index to check
Returns:
bool Whether allowed to joinstring Reason if not allowed
nut.class.get (identifier)
nut.class.get
Gets a class definition by index or ID
Parameters:
integer identifier Class indexReturns:
table Class definition tablenut.class.getPlayers (class)
nut.class.getPlayers
Gets all players in a specific class