Difference between revisions of "serverCommandAvailable"

From Bohemia Interactive Community
Jump to navigation Jump to search
(servercommand will not work from anywhere)
m
Line 17: Line 17:
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
 
|x1 = <code>_can = [[serverCommandAvailable]] "#kick";</code>
 
|x1 = <code>_can = [[serverCommandAvailable]] "#kick";</code>
|x2 = Add button to the main map to lock server, which could only be activated by admin:
+
|x2 = <code>
<code>
 
 
[[if]] ([[serverCommandAvailable]] "#logout") [[then]] {
 
[[if]] ([[serverCommandAvailable]] "#logout") [[then]] {
 
[[hint]] "You are an admin";
 
[[hint]] "You are an admin";

Revision as of 10:39, 16 October 2014

Introduced with Arma 2 version 1.051.05
Hover & click on the images for descriptions

Description

Description:
Returns true if the serverCommand can be performed on the machine, false if not. serverCommand can be executed only from User Interface Event Handlers, so calling this command elsewhere may return true even if serverCommand would have no effect.

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 an admin"; };

Additional Information

See also:
serverCommandserverCommandExecutableMultiplayer Server Commands
Groups:
Uncategorised

Notes

i
Only post proven facts here. Report bugs on the Feedback Tracker and discuss on the Arma Discord or on the Forums.

Notes

Bottom Section