{"name":"getClientState","operator":null,"title":"getClientState","type":"command","url":"https://community.bistudio.com/wiki/getClientState","revid":348401,"updated":"2023-11-08T13:00:04Z","groups":["Multiplayer"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.08"}],"since":{"game":"arma3","name":"Arma 3","version":"1.08"},"arma3_since":"1.08","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns client state in network game. Works on both, client and dedicated server. The following states are possible:\n\n| getClientStateNumber | getClientState | Description |\n|---|---|---|\n| 0 | \"NONE\" | No client (or singleplayer) |\n| 1 | \"CREATED\" | Client is created |\n| 2 | \"CONNECTED\" | Client is connected to server, message formats are registered |\n| 3 | \"LOGGED IN\" | Identity is created |\n| 4 | \"MISSION SELECTED\" | Mission is selected |\n| 5 | \"MISSION ASKED\" | Server was asked to send / not send mission |\n| 6 | \"ROLE ASSIGNED\" | Role was assigned (and confirmed) |\n| 7 | \"MISSION RECEIVED\" | Mission received |\n| 8 | \"GAME LOADED\" | Island loaded, vehicles received |\n| 9 | \"BRIEFING SHOWN\" | Briefing was displayed |\n| 10 | \"BRIEFING READ\" | Ready to play mission |\n| 11 | \"GAME FINISHED\" | Game was finished |\n| 12 | \"DEBRIEFING READ\" | Debriefing read, ready to continue with next mission |","syntaxes":[{"syntax":"getClientState","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"String","types":["String"],"description":"client state (see table above)","text":"String - client state (see table above)"},"form":"nullary","operator":null,"left":null,"right":null}],"examples":[{"text":"```sqf\n_state = getClientState;\n```","code":["_state = getClientState;"]},{"text":"```sqf\nif (getClientState == \"BRIEFING READ\") then { hint \"Let the show begin!\" };\n```","code":["if (getClientState == \"BRIEFING READ\") then { hint \"Let the show begin!\" };"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["getClientStateNumber","getPlayerUID"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Multiplayer","Introduced with Arma 3 version 1.08","Scripting Commands"]}