ix.class

Helper library for loading/getting class information.

Classes are temporary assignments for characters - analogous to a "job" in a faction. For example, you may have a police faction in your schema, and have "police recruit" and "police chief" as different classes in your faction. Anyone can join a class in their faction by default, but you can restrict this as you need with CLASS.CanSwitchTo.

Functions

ix.class.CanSwitchTo(client, class)

View source »

Determines if a player is allowed to join a specific class.

Parameters

  • client Player

    Player to check

  • class number

    Index of the class

Returns

  • bool

    Whether or not the player can switch to the class

ix.class.Get(identifier)

View source »

Retrieves a class table.

Parameters

  • identifier number

    Index of the class

Returns

ix.class.GetPlayers(class)

View source »

Retrieves the players in a class

Parameters

  • class number

    Index of the class

Returns

  • table

    Table of players in the class

ix.class.LoadFromDir(directory)

Internal

This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.

View source »

Loads classes from a directory.

Parameters

  • directory string

    The path to the class files.