serverCommand: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{ServerExec}}" to "{{Icon|serverExec|32}}") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *PARAMETER[0-9]{1,3} *= * " to " ") |
||
Line 23: | Line 23: | ||
|s2= password [[serverCommand]] command {{Since|arma3|1.39|y}} {{Icon|serverExec|32}} | |s2= password [[serverCommand]] command {{Since|arma3|1.39|y}} {{Icon|serverExec|32}} | ||
|p21= password : [[String]] - password defined in [[server.cfg]] with <tt>serverCommandPassword</tt> param | |p21= password : [[String]] - password defined in [[server.cfg]] with <tt>serverCommandPassword</tt> param | ||
|p22= command : [[String]] - server command | |p22= command : [[String]] - server command | ||
|r2= [[Boolean]] - [[true]] if password is correct | |r2= [[Boolean]] - [[true]] if password is correct |
Revision as of 19:13, 29 January 2021
Description
- Description:
- Description needed
- Groups:
- Multiplayer
Syntax
- Syntax:
- Syntax needed
- Parameters:
- command : String
- Return Value:
- Return value needed
Alternative Syntax
- Syntax:
- password serverCommand command Template:Since SEServer
- Parameters:
- password : String - password defined in server.cfg with serverCommandPassword param
- command : String - server command
- Return Value:
- Boolean - true if password is correct
Examples
- Example 1:
serverCommand "#logout";
- Example 2:
- Create button on the main map which will show userlist to anyone who clicks on it:
with uiNamespace do { ctrl = findDisplay 12 ctrlCreate ["RscButton", -1]; ctrl ctrlSetPosition [0,0,0.5,0.1]; ctrl ctrlSetText "USERLIST"; ctrl ctrlCommit 0; ctrl ctrlAddEventHandler ["ButtonDown", { serverCommand "#userlist"; }]; };
- Example 3:
serverCommand format ["#kick %1",_name];
- Example 4:
_passwordWasOK = "MyServerCommandPassword" serverCommand "#lock";
Additional Information
- See also:
- See also needed
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