Skip to main content

GameVersionUtils

Utility functions to automatically detect the version a game is running at

Types

ServerType

type ServerType = "standard" | "vip" | "reserved"

The server type to return

Functions

getBuild

GameVersionUtils.getBuild() → string

Gets the game build

getBuildWithServerType

GameVersionUtils.getBuildWithServerType() → string

Gets the game build with a server type specified for debugging

getServerType

GameVersionUtils.getServerType() → ServerType

Gets a string label for the current server type

isVIPServer

GameVersionUtils.isVIPServer() → boolean

Returns true if we're a VIP server

Show raw api
{
    "functions": [
        {
            "name": "getBuild",
            "desc": "Gets the game build",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 22,
                "path": "src/gameversionutils/src/Server/GameVersionUtils.lua"
            }
        },
        {
            "name": "getBuildWithServerType",
            "desc": "Gets the game build with a server type specified for debugging",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 34,
                "path": "src/gameversionutils/src/Server/GameVersionUtils.lua"
            }
        },
        {
            "name": "getServerType",
            "desc": "Gets a string label for the current server type",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ServerType"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 42,
                "path": "src/gameversionutils/src/Server/GameVersionUtils.lua"
            }
        },
        {
            "name": "isVIPServer",
            "desc": "Returns true if we're a VIP server",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 58,
                "path": "src/gameversionutils/src/Server/GameVersionUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "ServerType",
            "desc": "The server type to return",
            "lua_type": "\"standard\" | \"vip\" | \"reserved\"",
            "source": {
                "line": 16,
                "path": "src/gameversionutils/src/Server/GameVersionUtils.lua"
            }
        }
    ],
    "name": "GameVersionUtils",
    "desc": "Utility functions to automatically detect the version a game is running at",
    "source": {
        "line": 6,
        "path": "src/gameversionutils/src/Server/GameVersionUtils.lua"
    }
}