{"name":"isDedicated","title":"isDedicated","type":"command","url":"https://community.bistudio.com/wiki/isDedicated","revid":337566,"updated":"2023-02-10T01:14:00Z","groups":["Multiplayer"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Returns true if the machine executing the command is a dedicated multiplayer server. Returns false in single player.","syntaxes":[{"syntax":"isDedicated","params":[],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"nullary"}],"examples":[{"code":["if (isDedicated) then { diag_log \"Dedicated Server on the run !\"; };"]}],"see_also":["isServer","hasInterface"],"notes":[{"user":"Killzone_Kid","date":"2014-12-21T14:54: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```"}]}