Arma 3 Scripting

serverCommandAvailable

  • Arma 3 v0.50
  • First in Arma 2 v1.05

Command · Markdown · JSON · original wiki page

Description

Returns true if given serverCommand is available on current machine, false if not.

Note

Execution via RCon is basically being logged-in as admin in terms of permissions.

Arma 3 Multiplayer Server Commands Available to
Arma 3 Multiplayer Server Commands Client Voted Admin Logged Admin Server Host
#login, #userlist, #beclient, #vote ✓ ✓ ✓ ✓
#kick, #debug ✗ ✓ ✓ ✓
#lock, #unlock, #maxping, #maxdesync, #maxpacketloss ✗ ✗ ✓ ✓
#logout, #restart, #mission, #missions, #reassign, #monitor, #init ✗ ✓ ✓ ✗
#shutdown, #restartserver, #restartserveraftermission, #shutdownaftermission, #dctimeout, #exec, #monitords, #beserver ✗ ✗ ✓ ✗
#logentities, #exportjipqueue ✗ ✗ ✓ ✓
Profiling type builds only: #captureframe, #captureslowframe ✗ ✗ ✓ ✓

To check if a server command can be executed in the current environment, use serverCommandExecutable.

Note

The table above does not apply to the command's password variant on a dedicated server as everything is available to it.

Syntax

serverCommandAvailable command

Parameters:

Returns: Boolean

Examples

Example 1

_can = serverCommandAvailable "#kick";

Example 2

if (serverCommandAvailable "#logout") then
{
    hint "You are a some sort of admin";
};

See also

serverCommand · serverCommandExecutable · admin · isServer · Multiplayer Server Commands