GetGameVersionString

From Onset Developer Wiki
Revision as of 14:07, 25 January 2020 by BlueMountains (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
GetGameVersionString

Type: Function
Context: Server & Client
Introduced: v1.0

Description

Returns the server/ client's game version as a string.

Syntax

GetGameVersionString()

Parameters

  • This function has no parameters.

Return Value

  • Returns the game version as a string.

Example

Client:

local function OnPackageStart()
    AddPlayerChat("Your game version is: "..GetGameVersionString())
end
AddEvent("OnPackageStart", OnPackageStart)

Server:

local function OnPlayerJoin(player)
	AddPlayerChat(player, "This server runs on game version: "..GetGameVersionString())
end
AddEvent("OnPlayerJoin", OnPlayerJoin)

See also