serverCommandAvailable: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma2 |Game name=
| arma2 |Game name=
Line 7: Line 6:


|gr1= Multiplayer |GROUP1=
|gr1= Multiplayer |GROUP1=
____________________________________________________________________________________________


| 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 25: Line 23:
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. |DESCRIPTION=
'''NOTE''': When password variant of [[serverCommand]] is used on dedicated server, the table above does not apply as everything is available to it. |DESCRIPTION=
____________________________________________________________________________________________


| '''serverCommandAvailable''' command |SYNTAX=
| '''serverCommandAvailable''' command |SYNTAX=
Line 32: Line 29:


| [[Boolean]] |RETURNVALUE=
| [[Boolean]] |RETURNVALUE=
____________________________________________________________________________________________
|x1 = <code>_can = [[serverCommandAvailable]] "#kick";</code>
|x1 = <code>_can = [[serverCommandAvailable]] "#kick";</code>
|x2 = <code>[[if]] ([[serverCommandAvailable]] "#logout") [[then]]  
|x2 = <code>[[if]] ([[serverCommandAvailable]] "#logout") [[then]]  

Revision as of 02:45, 17 January 2021

Hover & click on the images for description

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

  • Available to any admin (voted in / logged in) or server host

#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

Syntax:
serverCommandAvailable command
Parameters:
command: String
Return Value:
Boolean

Examples

Example 1:
_can = serverCommandAvailable "#kick";
Example 2:
if (serverCommandAvailable "#logout") then { hint "You are a some sort of admin"; };

Additional Information

See also:
serverCommandserverCommandExecutableadminMultiplayer Server Commands

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

Notes

Bottom Section