serverCommandAvailable: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 31: Line 31:
____________________________________________________________________________________________
____________________________________________________________________________________________
|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 a some sort of admin";
[[hint]] "You are a some sort of admin";
};</code>
};</code>

Revision as of 21:30, 18 April 2017

Hover & click on the images for description

Description

Description:
Returns true if the 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 (voted in or logged in) admin or server

#kick, #debug

#lock, #unlock, #maxping, #maxdesync, #maxpacketloss

  • Available to any (voted in or logged in) admin

#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
Groups:
Uncategorised

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