serverCommandAvailable: Difference between revisions
| m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "") | Lou Montana (talk | contribs)  m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...) | ||
| Line 1: | Line 1: | ||
| {{Command | {{Command | ||
| | arma2  | | arma2 | ||
| |1.05 | |1.05 | ||
| |gr1= Multiplayer  | |gr1= Multiplayer | ||
| | Returns [[true]] if given [[serverCommand]] is available on current machine, [[false]] if not. Here is the general table of availability of Arma 3 server commands: | | Returns [[true]] if given [[serverCommand]] is available on current machine, [[false]] if not. Here is the general table of availability of Arma 3 server commands: | ||
| Line 22: | Line 22: | ||
| <blockquote><tt>#captureframe</tt>, <tt>#enabletest</tt>, <tt>#disabletest</tt></blockquote> | <blockquote><tt>#captureframe</tt>, <tt>#enabletest</tt>, <tt>#disabletest</tt></blockquote> | ||
| To check if server command could be executed in current environment use [[serverCommandExecutable]]. For more information on what each server command does, see [[Multiplayer Server Commands]].<br><br> | To check if server command could be executed in current environment use [[serverCommandExecutable]]. For more information on what each server command does, see [[Multiplayer Server Commands]].<br><br> | ||
| '''NOTE''': When password variant of [[serverCommand]] is used on dedicated server, the table above does not apply as everything is available to it.  | '''NOTE''': When password variant of [[serverCommand]] is used on dedicated server, the table above does not apply as everything is available to it. | ||
| | '''serverCommandAvailable''' command  | | '''serverCommandAvailable''' command | ||
| |p1=  command: [[String]]  | |p1=  command: [[String]] | ||
| | [[Boolean]]  | | [[Boolean]] | ||
| |x1 = <code>_can = [[serverCommandAvailable]] "#kick";</code> | |x1 = <code>_can = [[serverCommandAvailable]] "#kick";</code> | ||
| |x2 = <code>[[if]] ([[serverCommandAvailable]] "#logout") [[then]]   | |x2 = <code>[[if]] ([[serverCommandAvailable]] "#logout") [[then]]   | ||
| Line 34: | Line 34: | ||
| 	[[hint]] "You are a some sort of admin"; | 	[[hint]] "You are a some sort of admin"; | ||
| };</code> | };</code> | ||
| | [[serverCommand]], [[serverCommandExecutable]], [[admin]], [[Multiplayer Server Commands]]  | | [[serverCommand]], [[serverCommandExecutable]], [[admin]], [[Multiplayer Server Commands]] | ||
| }} | }} | ||
Revision as of 11:03, 18 January 2021
Description
- Description:
- Returns true if given serverCommand is available on current machine, false if not. Here is the general table of availability of Arma 3 server commands:
 - Available to anyone
 #login, #userlist, #beclient, #vote #kick, #debug #lock, #unlock, #maxping, #maxdesync, #maxpacketloss - Available to any admin (voted in / logged in)
 #logout, #restart, #mission, #missions, #reassign, #monitor, #init - Available to logged in admin
 #shutdown, #restartserver, #exec, #beserver, #monitords, #logentities, #exportjipqueue - Available to logged in admin on certain game builds
 #captureframe, #enabletest, #disabletest To check if server command could be executed in current environment use serverCommandExecutable. For more information on what each server command does, see Multiplayer Server Commands. NOTE: When password variant of serverCommand is used on dedicated server, the table above does not apply as everything is available to it.
 
- Groups:
- Multiplayer
Syntax
Examples
- Example 1:
- _can = serverCommandAvailable "#kick";
- Example 2:
- if (serverCommandAvailable "#logout") then { hint "You are a some sort of admin"; };
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
 
	