serverCommandAvailable: Difference between revisions
| Lou Montana (talk | contribs) m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>") | Lou Montana (talk | contribs)  m (Some wiki formatting) | ||
| Line 15: | Line 15: | ||
| |gr1= Multiplayer | |gr1= Multiplayer | ||
| |descr= Returns [[true]] if given [[serverCommand]] is available on current machine, [[false]] if not.  | |descr= Returns [[true]] if given [[serverCommand]] is available on current machine, [[false]] if not. | ||
| {{{!}} class="wikitable align-center" | |||
| ! rowspan="2" {{!}} {{arma3}} [[Multiplayer Server Commands]] | |||
| ! colspan="4" {{!}} Available to | |||
| {{!}}- | |||
| ! Client | |||
| ! Voted [[admin|Admin]] | |||
| ! Logged [[admin|Admin]] | |||
| ! [[isServer|Server Host]] | |||
| {{!}}- | |||
| {{!}} {{hl|#login}}, {{hl|#userlist}}, {{hl| #beclient}}, {{hl| #vote}} | |||
| {{!}} {{Icon|checked}} | |||
| {{!}} {{Icon|checked}} | |||
| To check if server command  | {{!}} {{Icon|checked}} | ||
| {{!}} {{Icon|checked}} | |||
| {{!}}- | |||
| {{!}} {{hl|#kick}}, {{hl|#debug}} | |||
| {{!}} {{Icon|unchecked}} | |||
| {{!}} {{Icon|checked}} | |||
| {{!}} {{Icon|checked}} | |||
| {{!}} {{Icon|checked}} | |||
| {{!}}- | |||
| {{!}} {{hl|#lock}}, {{hl|#unlock}}, {{hl|#maxping}}, {{hl|#maxdesync}}, {{hl|#maxpacketloss}} | |||
| {{!}} {{Icon|unchecked}} | |||
| {{!}} {{Icon|unchecked}} | |||
| {{!}} {{Icon|checked}} | |||
| {{!}} {{Icon|checked}} | |||
| {{!}}- | |||
| {{!}} {{hl|#logout}}, {{hl|#restart}}, {{hl|#mission}}, {{hl|#missions}}, {{hl|#reassign}}, {{hl|#monitor}}, {{hl|#init}} | |||
| {{!}} {{Icon|unchecked}} | |||
| {{!}} {{Icon|checked}} | |||
| {{!}} {{Icon|checked}} | |||
| {{!}} {{Icon|unchecked}} | |||
| {{!}}- | |||
| {{!}} {{hl|#shutdown}}, {{hl|#restartserver}}, {{hl|#exec}}, {{hl|#beserver}}, {{hl|#monitords}}, {{hl|#logentities}}, {{hl|#exportjipqueue}} | |||
| {{!}} {{Icon|unchecked}} | |||
| {{!}} {{Icon|unchecked}} | |||
| {{!}} {{Icon|checked}} | |||
| {{!}} {{Icon|unchecked}} | |||
| {{!}}- | |||
| {{!}} Specific builds only: {{hl|#captureframe}}, {{hl|#enabletest}}, {{hl|#disabletest}} | |||
| {{!}} {{Icon|unchecked}} | |||
| {{!}} {{Icon|unchecked}} | |||
| {{!}} {{Icon|checked}} | |||
| {{!}} {{Icon|unchecked}} | |||
| {{!}}} | |||
| To check if a [[Multiplayer Server Commands|server command]] can be executed in the current environment, use [[serverCommandExecutable]]. | |||
| {{Feature|informative|The table above does not apply to the command's password variant on a dedicated server as everything is available to it.}} | |||
| |s1= [[serverCommandAvailable]] command | |s1= [[serverCommandAvailable]] command | ||
| Line 39: | Line 74: | ||
| |x1= <sqf>_can = serverCommandAvailable "#kick";</sqf> | |x1= <sqf>_can = serverCommandAvailable "#kick";</sqf> | ||
| |x2= <sqf>if (serverCommandAvailable "#logout") then   | |x2= <sqf>if (serverCommandAvailable "#logout") then   | ||
| { | { | ||
| 	hint "You are a some sort of admin"; | 	hint "You are a some sort of admin"; | ||
| };</sqf> | };</sqf> | ||
| |seealso= [[serverCommand]] [[serverCommandExecutable]] [[admin]] [[Multiplayer Server Commands]] | |||
| |seealso= [[serverCommand]] [[serverCommandExecutable]] [[admin]] [[isServer]] [[Multiplayer Server Commands]] | |||
| }} | }} | ||
Revision as of 18:07, 29 December 2022
Description
- Description:
- Returns true if given serverCommand is available on current machine, false if not.
Arma 3 Multiplayer Server Commands Available to Client Voted Admin Logged Admin Server Host #login, #userlist, #beclient, #vote         #kick, #debug         #lock, #unlock, #maxping, #maxdesync, #maxpacketloss         #logout, #restart, #mission, #missions, #reassign, #monitor, #init         #shutdown, #restartserver, #exec, #beserver, #monitords, #logentities, #exportjipqueue         Specific builds only: #captureframe, #enabletest, #disabletest         To check if a server command can be executed in the current environment, use serverCommandExecutable. 
- Groups:
- Multiplayer
Syntax
- Syntax:
- serverCommandAvailable command
- Parameters:
- command: String
- Return Value:
- Boolean
Examples
- Example 1:
- Example 2:
Additional Information
Notes
- 
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
 Only post proven facts here! Add Note
 
	


