Skip to content

Class Generator

Create sub-roles and specialized classes for your factions, such as 'Medic' or 'Officer'.


Overview

Use this tool to generate the Lua structure for your custom class. Once generated, the code should be placed in a new file within your schema's classes directory.

Recommended Placement:

garrysmod/gamemodes/[schema folder]/schema/classes/[class_name].lua

The unique identifier for this class (e.g., CLASS_POLICEOFFICER)
The faction index this class belongs to (e.g., FACTION_POLICE)
Players need to be whitelisted to join this class
This is the default class for the faction
0 = unlimited, decimals = percentage of faction (e.g., 0.5 = 50%)
Player model path(s) (leave empty to inherit from faction)
Comma-separated RGB values (0-255), leave empty to inherit from faction
Model skin index (leave empty to inherit from faction)
Logo material path or URL for scoreboard (leave empty for no logo)
Model scale multiplier (1.0 = normal size)
Leave empty to inherit from faction
Leave empty to inherit from faction
Currency amount per paycheck (leave empty to inherit from faction)
Leave empty to inherit from faction
Leave empty to inherit from faction
Leave empty to inherit from faction
Leave empty to inherit from faction
Class won't appear in scoreboard categories
Lower numbers appear first in scoreboard (default: 999)
Allows this class to invite players into the faction
Allows this class to invite players into the same class
Groups related classes for door access (leave empty for no team)
Command permissions

Generated Code