# Enable/Disable Command Type

Grammardisable|Enable/Disable commandOption for playerGroup
FlagsNative | Action

Enables or disables certain types of interface commands. Use the “Set Command Type Disabled Message” action to customize the message that is displayed when the player attempts to use commands disabled in this manner.

# Arguments

Returns — void

native void UISetCommandAllowed(
	playergroup players,
	int option,
	bool allow,
);

Category: UI / Game UI

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L191
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L192
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L193
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L732
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L733
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L734
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L926
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L927
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, true)
// L928
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, true)
// L277
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L278
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L279
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L770
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L771
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L772
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L1063
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, true)
// L1064
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, true)
// L1065
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, true)
// L186
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L187
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L188
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L718
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L719
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L720
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L912
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, true)
// L913
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, true)
// L914
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, true)
// L185
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L186
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L187
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L188
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowMinimap, false)
// L700
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L701
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L702
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L890
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, true)
// L891
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, true)
// L892
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, true)
// L2905
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, true)
// L3067
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L3976
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L4792
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L5232
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L5722
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L16720
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L16721
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowPings, false)
// L1105
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowPings, false)
// L2905
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, true)
// L3067
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L3976
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L4792
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L5232
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L5722
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L16720
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L16721
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowPings, false)
// L1105
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowPings, false)
// L191
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L192
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L193
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L732
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L733
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L734
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L926
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L927
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, true)
// L928
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, true)
// L277
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L278
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L279
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L770
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L771
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L772
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L1063
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, true)
// L1064
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, true)
// L1065
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, true)
// L186
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L187
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L188
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L718
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L719
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L720
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L912
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, true)
// L913
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, true)
// L914
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, true)
// L185
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L186
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L187
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L188
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowMinimap, false)
// L700
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L701
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, false)
// L702
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, false)
// L890
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, true)
// L891
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowHotkeys, true)
// L892
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowButtons, true)
// L1516
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowQueue, false)
// L1517
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)
// L1523
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowQueue, true)
// L1524
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, true)
// L1792
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowQueue, true)
// L1793
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, true)
// L1516
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowQueue, false)
// L1517
UISetCommandAllowed(PlayerGroupAll(), c_uiCommandAllowSmartClick, false)