{"name":"hasInterface","title":"hasInterface","type":"command","url":"https://community.bistudio.com/wiki/hasInterface","revid":379352,"updated":"2026-10-30T23:55:06Z","groups":["Multiplayer"],"status":"ok","games":{"arma2oa":"1.63","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.63","arma3_since":"0.50","description":"Returns true if the computer has an interface (a real player). False for a dedicated server or for a headless client.","syntaxes":[{"syntax":"hasInterface","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["_isHC = !(hasInterface || isDedicated);"]},{"code":["_isHC = !hasInterface && !isDedicated;"]}],"see_also":["isDedicated","isServer"],"notes":[{"user":"Killzone_Kid","date":"2014-12-21T14:55:00Z","text":"```sqf\nif (isDedicated) then {\n    //run on dedicated server only\n};\n\nif (isServer) then {\n    //run on dedicated server or player host\n};\n\nif (hasInterface) then {\n    //run on all player clients incl. player host\n};\n\nif (!isDedicated) then {\n    //run on all player clients incl. player host and headless clients\n};\n\nif (!isServer) then {\n    //run on all player clients incl. headless clients but not player host\n};\n\nif (!hasInterface) then {\n    //run on headless clients and dedicated server\n};\n\nif (!hasInterface && !isDedicated) then {\n    //run on headless clients only\n};\n```"}]}