GameInstaller

API Documentation

\GSPPanel\GameInstaller

This class allows interaction with the gameinstaller

Methods

InstallGame(array $params) : array

Install/Download the game files

$params requires the following:

  • sid: Machines ID (REQUIRED)
  • linuxsteamid: The game's Steam ID for Linux servers
  • windowssteamid: The game's Steam ID for Windows servers
  • linuxdl: The URL to download for Linux servers
  • windowsdl: The URL to download for Windows servers
  • linuxcmd: The command to run on Linux servers
  • windowscmd: The command to run on Windows servers
  • extract: Extract the file after it's been downloaded (0/1, 1 means extract)
  • path: Path to download to, relative to the machines file path
  • steamuser: SteamCMD username
  • steampass: SteamCMD password

Returns one of the following in an array format:

  • error
    • 0 - Game install started
    • -1 - Error installing game, see task in the tasklist
Parameters
NameTypeDescription
$paramsarray
Returns
TypeDescription
array
UpdateSteamCMD(integer $sid) : void

Run SteamCMD to update it

Parameters
NameTypeDescription
$sidinteger

Machine's ID

doesSteamCMDExist(integer $sid) : boolean

Check if the SteamCMD directory exists

Parameters
NameTypeDescription
$sidinteger

Machine ID

Returns
TypeDescription
boolean
Documentation was generated by phpDocumentor 2.9.0.