{"name":"isDedicated","operator":null,"title":"isDedicated","type":"command","url":"https://community.bistudio.com/wiki/isDedicated","revid":337566,"updated":"2023-02-10T01:14:00Z","groups":["Multiplayer"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns true if the machine executing the command is a dedicated multiplayer server. Returns false in single player.","syntaxes":[{"syntax":"isDedicated","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"Boolean","types":["Boolean"],"description":null,"text":"Boolean"},"form":"nullary","operator":null,"left":null,"right":null}],"examples":[{"text":"```sqf\nif (isDedicated) then { diag_log \"Dedicated Server on the run !\"; };\n```","code":["if (isDedicated) then { diag_log \"Dedicated Server on the run !\"; };"]}],"multiplayer":null,"problems":null,"aliases":[],"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```"}],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Multiplayer","Introduced with Arma 2 version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}