Fretta variables
From GMod Wiki
Go to: Fretta Articles |
This article will briefly explain the variables and toggles used in Fretta to change certain aspects of your gamemode without any additional code.
Variable name | Type | Default | Description |
---|---|---|---|
GM.TeamBased | boolean | true | Determines if the gamemode uses teams. |
GM.AllowAutoTeam | boolean | true | Allow players to auto assign teams? |
GM.AllowSpectating | boolean | true | Allow players to join spectator? |
GM.SecondsBetweenTeamSwitches | number | 10 | Delay between team switches in seconds. Prevents team switch spam. |
GM.GameLength | number | 15 | Total game length in minutes. |
GM.RoundLimit | number | -1 | Limits how many rounds can be played per game (-1 for unlimited). |
GM.VotingDelay | number | 5 | Delay between end of game, and vote. if you want to display any extra screens before the vote pops up. |
GM.NoPlayerSuicide | boolean | false | Set to true to prevent players from committing suicide. |
GM.NoPlayerDamage | boolean | false | Set to true to prevent players from taking damage. |
GM.NoPlayerSelfDamage | boolean | false | Set to true to prevent players from taking damage from themselves (ie. grenades). |
GM.NoPlayerTeamDamage | boolean | true | Set to true to prevent team damage. |
GM.NoPlayerPlayerDamage | boolean | false | Set to true to prevent player vs. player damage. |
GM.NoNonPlayerPlayerDamage | boolean | false | Set to true to prevent players from taking damage from non-players. |
GM.NoPlayerFootsteps | boolean | false | Set to true to disable player footsteps. |
GM.PlayerCanNoClip | boolean | false | Set to true to allow players to no clip without sv_cheats set to 1. |
GM.TakeFragOnSuicide | boolean | true | Should a player have a frag taken away for suicide? Defaults to true. |
GM.MaximumDeathLength | number | 0 | Maximum death time in gamemodes where players respawn after death. Players will respawn once over this time. |
GM.MinimumDeathLength | number | 2 | Minimum death time. A player cannot respawn until this time has past. |
GM.AutomaticTeamBalance | boolean | false | Automatically balance teams? |
GM.ForceJoinBalancedTeams | boolean | true | Force players to join the least favourable team? Defaults to true. |
GM.RealisticFallDamage | boolean | false | Set to true to use realistic fall damage instead of the fixed 10 damage. |
GM.AddFragsToTeamScore | boolean | false | Set to true to make frags count in the team's score. |
GM.NoAutomaticSpawning | boolean | false | Set to true to override the default spawning behaviour. |
GM.RoundBased | boolean | false | Set to true if you want round based gameplay. |
GM.RoundLength | number | 30 | Duration of a round in seconds. |
GM.RoundPreStartTime | number | 5 | Freeze time at the start of a round. |
GM.RoundPostLength | number | 8 | The amount of time between winning/round end and a new round starting. |
GM.RoundEndsWhenOneTeamAlive | boolean | true | End the round when only one team is left alive? |
GM.EnableFreezeCam | boolean | false | Use TF2-style freecam on death? |
GM.DeathLingerTime | number | 4 | Amount of time in seconds between dying and going into spectate. |
GM.SelectModel | boolean | true | Are players allowed to pick their model in this gamemode? |
GM.SelectColor | boolean | false | Can players change their colour? Non-team based modes. |
GM.SelectClass | boolean | false | Can players change their class? |
GM.PlayerRingSize | number | 48 | Size of ring at player's feet if they're enabled. |
GM.HudSkin | string | SimpleSkin | Derma skin used by gamemode. |
GM.SuicideString | string | died | String to append player's name when they commit suicide. |
GM.DeathNoticeDefaultColor | Color | 255 128 0 | Colour used in death notices for entity kills. |
GM.DeathNoticeTextColor | Color | 255 255 255 | Colour to use for text which aren't names or entities. |
GM.ValidSpectatorModes | table | N/A | Table of OBS_MODEs which the player can use while spectating. |
GM.ValidSpectatorEntities | table | N/A | Table of entity class names a player can spectate. |
GM.CanOnlySpectateOwnTeam | boolean | true | Can players only spectate their own team? This also disables free roam. |