{"name":"serverCommandAvailable","title":"serverCommandAvailable","type":"command","url":"https://community.bistudio.com/wiki/serverCommandAvailable","revid":370060,"updated":"2024-10-29T14:40:43Z","groups":["Multiplayer"],"status":"ok","games":{"arma2":"1.05","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.05","arma3_since":"0.50","description":"Returns true if given serverCommand is available on current machine, false if not.\n\n> [!NOTE]\n> Execution via RCon is basically being **logged-in** as admin in terms of permissions.\n\n| Arma 3 Multiplayer Server Commands | Available to |  |  |  |\n|---|---|---|---|---|\n| Arma 3 Multiplayer Server Commands | Client | Voted Admin | Logged Admin | Server Host |\n| `#login`, `#userlist`, `#beclient`, `#vote` | ✓ | ✓ | ✓ | ✓ |\n| `#kick`, `#debug` | ✗ | ✓ | ✓ | ✓ |\n| `#lock`, `#unlock`, `#maxping`, `#maxdesync`, `#maxpacketloss` | ✗ | ✗ | ✓ | ✓ |\n| `#logout`, `#restart`, `#mission`, `#missions`, `#reassign`, `#monitor`, `#init` | ✗ | ✓ | ✓ | ✗ |\n| `#shutdown`, `#restartserver`, `#restartserveraftermission`, `#shutdownaftermission`, `#dctimeout`, `#exec`, `#monitords`, `#beserver` | ✗ | ✗ | ✓ | ✗ |\n| `#logentities`, `#exportjipqueue` | ✗ | ✗ | ✓ | ✓ |\n| Profiling type builds only: `#captureframe`, `#captureslowframe` | ✗ | ✗ | ✓ | ✓ |\n\nTo check if a server command can be executed in the current environment, use serverCommandExecutable.\n\n> [!NOTE]\n> The table above does not apply to the command's password variant on a dedicated server as everything is available to it.","syntaxes":[{"syntax":"serverCommandAvailable command","params":[{"name":"command","type":"String","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"command"}}],"examples":[{"code":["_can = serverCommandAvailable \"#kick\";"]},{"text":"```sqf\nif (serverCommandAvailable \"#logout\") then\n{\n    hint \"You are a some sort of admin\";\n};\n```","code":["if (serverCommandAvailable \"#logout\") then \n{\n\thint \"You are a some sort of admin\";\n};"]}],"see_also":["serverCommand","serverCommandExecutable","admin","isServer","Multiplayer Server Commands"]}