Garry's Mod Wiki

Revision Difference

Structures/GM#516879

<cat>struct</cat> {{Structure⤶ |Description=Information about a gamemode, used in .⤶ <structure>⤶ <description>⤶ Information about a gamemode, used in .⤶ While some of the fields may be serverside or clientside only, it is recommended to provide them on both so addons could use their values. |Fields={{StructureField|string|Name|The fancy name of your gamemode.}}{{StructureField|string|Author|The name/contact info of the gamemode author.}}{{StructureField|string|Email|The contact email associated with the gamemode.}}{{StructureField|string|Website|The website associated with the gamemode.}}{{StructureField|string|FolderName|The name of the gamemode folder, automatically set.}}{{StructureField|string|Folder|The name of the gamemode folder prepended with "gamemodes/" (such as "gamemodes/sandbox"), automatically set.}}{{StructureField|boolean|TeamBased|Set this to true if your gamemode is team-based. Used to enable/disable the base gamemode team system.}}{{StructureField|boolean|IsSandboxDerived|True if the gamemode is derived from sandbox.}}{{StructureField|string|ThisClass|The name of the gamemode folder prepended with "gamemode_" (such as "gamemode_sandbox"), automatically set.}}{{StructureField|table|BaseClass|The table of the base gamemode to derive from, set automatically by <page>Global.DeriveGamemode</page>.⤶ </description>⤶ <fields>{{StructureField|string|Name|The fancy name of your gamemode.</fields>⤶ ⤶ </structure>⤶ ⤶ {{StructureField|string|Author|The name/contact info of the gamemode author.}}{{StructureField|string|Email|The contact email associated with the gamemode.}}{{StructureField|string|Website|The website associated with the gamemode.}}{{StructureField|string|FolderName|The name of the gamemode folder, automatically set.}}{{StructureField|string|Folder|The name of the gamemode folder prepended with "gamemodes/" (such as "gamemodes/sandbox"), automatically set.}}{{StructureField|boolean|TeamBased|Set this to true if your gamemode is team-based. Used to enable/disable the base gamemode team system.}}{{StructureField|boolean|IsSandboxDerived|True if the gamemode is derived from sandbox.}}{{StructureField|string|ThisClass|The name of the gamemode folder prepended with "gamemode_" (such as "gamemode_sandbox"), automatically set.}}{{StructureField|table|BaseClass|The table of the base gamemode to derive from, set automatically by <page>Global.DeriveGamemode</page>.⤶ <note>It is recommended to use <page>Global.DEFINE_BASECLASS</page> when referencing the gamemode's BaseClass to prevent unintended behavior</note> <note><page>Global.DeriveGamemode</page> modifies the main gamemode's BaseClass, which is shared with parent gamemodes. Because of this, in parent gamemodes the BaseClass can be incorrect, so for instance you need to use `self.BaseClass.BaseClass` in the 1st parent instead</note> }} }}