SlashCo Wiki

GameData

GameData

Description

A Table containing various values as a performance improvement and for autorefresh support.
The following fields exist by default.

All Shared values are networked when a player joins the game, but only once, changing them while playing has no effect except for MaxPlayers.

Parameters

string Map
The name of the current map - value of game.GetMap()
string Lobby
The name of the lobby map

Default: sc_lobby

boolean IsLobby
true if the current map is the lobby
number BaseMaxSurvivors
Default number of max survivors

Default: 6

number BaseMaxPlayers
Default number of max players

Default: 7

number MaxPlayers
(Always Networked) Current number of max players - changed by slashco_maxplayers
number TotalSlots
How many slots the server has - value of game.MaxPlayers()
boolean IsSinglePlayer
true if the game is singleplayer - value of game.SinglePlayer()
boolean IsLan
true if the game is a lan game - checks if sv_lan is enabled, will enable -multirun support
Entity World
The world entity

Default: NULL

boolean IsNewPlayer
true if the local player is new to the game. This enables some UI hints for the first few rounds.
Entity LocalPlayer
The local player - Same as LocalPlayer() but faster to access

Default: NULL

number LocalEntIndex
The local player's entity index
string LocalSteamID
The local player's SteamID
string LocalSteamID64
The local player's SteamID64