# hasInterface ## Category Multiplayer ## Arity **Nular** — `hasInterface`. ``` hasInterface ``` ## Description Returns `true` if the current host has a player UI (graphical interface). Returns `false` for dedicated/headless servers. The host sets this via `HasInterface` property. Registered by `DeclareMultiplayerCommands()`. **NOT called automatically** — host must invoke explicitly. ## How It Works Reads the host's `HasInterface` flag. Controls whether UI-related code should execute. ## Usage ```sqf if (hasInterface) then { // Initialize UI, HUD, menus createHUD(); showIntro(); }; if (!hasInterface) then { // Headless — do server work only startHeadlessAI(); }; ``` ## Thread Safety ReadOnly — pure query. ## See Also - [isDedicated](isDedicated.md) — dedicated server check - [isServer](isServer.md) — server check - [player](player.md) — player object reference