Arma 3 Scripting

hasInterface

  • Arma 3 v0.50
  • First in Arma 2: Operation Arrowhead v1.63

Command · Markdown · JSON · original wiki page

Description

Returns true if the computer has an interface (a real player). False for a dedicated server or for a headless client.

Syntax

hasInterface

Returns: Boolean

Examples

Example 1

_isHC = !(hasInterface || isDedicated);

Example 2

_isHC = !hasInterface && !isDedicated;

See also

isDedicated · isServer

Community notes

Killzone_Kid

if (isDedicated) then {
    //run on dedicated server only
};

if (isServer) then {
    //run on dedicated server or player host
};

if (hasInterface) then {
    //run on all player clients incl. player host
};

if (!isDedicated) then {
    //run on all player clients incl. player host and headless clients
};

if (!isServer) then {
    //run on all player clients incl. headless clients but not player host
};

if (!hasInterface) then {
    //run on headless clients and dedicated server
};

if (!hasInterface && !isDedicated) then {
    //run on headless clients only
};