Difference between revisions of "serverCommandAvailable"
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (full list of all commands and availability) |
Lou Montana (talk | contribs) m (Text replacement - "{{Command " to "{{RV|type=command ") |
||
(26 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{RV|type=command |
− | |||
− | | arma2 | + | | arma2 |
− | |1.05 | + | |1.05 |
− | |||
− | | Returns [[true]] if | + | |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: | ||
<br><br> | <br><br> | ||
* '''Available to anyone''' | * '''Available to anyone''' | ||
<blockquote><tt>#login</tt>, <tt>#userlist</tt>, <tt> #beclient</tt>, <tt> #vote</tt></blockquote> | <blockquote><tt>#login</tt>, <tt>#userlist</tt>, <tt> #beclient</tt>, <tt> #vote</tt></blockquote> | ||
− | * '''Available to any (voted in | + | * '''Available to any [[admin]] (voted in / logged in) or [[isServer|server]] host''' |
<blockquote><tt>#kick</tt>, <tt>#debug</tt></blockquote> | <blockquote><tt>#kick</tt>, <tt>#debug</tt></blockquote> | ||
− | * '''Available to logged in [[admin]] or [[isServer|server]]''' | + | * '''Available to logged in [[admin]] or [[isServer|server]] host''' |
<blockquote><tt>#lock</tt>, <tt>#unlock</tt>, <tt>#maxping</tt>, <tt>#maxdesync</tt>, <tt>#maxpacketloss</tt></blockquote> | <blockquote><tt>#lock</tt>, <tt>#unlock</tt>, <tt>#maxping</tt>, <tt>#maxdesync</tt>, <tt>#maxpacketloss</tt></blockquote> | ||
− | * '''Available to any (voted in | + | * '''Available to any [[admin]] (voted in / logged in)''' |
<blockquote><tt>#logout</tt>, <tt>#restart</tt>, <tt>#mission</tt>, <tt>#missions</tt>, <tt>#reassign</tt>, <tt>#monitor</tt>, <tt>#init</tt></blockquote> | <blockquote><tt>#logout</tt>, <tt>#restart</tt>, <tt>#mission</tt>, <tt>#missions</tt>, <tt>#reassign</tt>, <tt>#monitor</tt>, <tt>#init</tt></blockquote> | ||
* '''Available to logged in [[admin]]''' | * '''Available to logged in [[admin]]''' | ||
Line 21: | Line 21: | ||
* '''Available to logged in [[admin]] on certain game builds''' | * '''Available to logged in [[admin]] on certain game builds''' | ||
<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]] | + | 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. | |
− | | '''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]] |
− | [[hint]] "You are | + | { |
+ | [[hint]] "You are a some sort of admin"; | ||
};</code> | };</code> | ||
− | | [[serverCommand]], [[serverCommandExecutable]], [[admin]], [[Multiplayer Server Commands]] | + | | [[serverCommand]], [[serverCommandExecutable]], [[admin]], [[Multiplayer Server Commands]] |
+ | }} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | ||
− | + | {{GameCategory|arma2|Scripting Commands}} | |
− | + | {{GameCategory|arma3|Scripting Commands}} | |
− | + | {{GameCategory|tkoh|Scripting Commands}} | |
− |
Latest revision as of 21:17, 23 January 2021
Hover & click on the images for descriptions
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.
Syntax
Examples
- Example 1:
_can = serverCommandAvailable "#kick";
- Example 2:
if (serverCommandAvailable "#logout") then { hint "You are a some sort of admin"; };