# Disable Panels

{% stepper %}
{% step %}
### Execute code via init.sqf

Start by either creating an **init.sqf** file or use the existing one within your mission directory. Once located, open the **init.sqf** file and proceed to copy this code or whichever code you prefer.
{% endstep %}

{% step %}
### Execute code via custom sqf file

You can also create a **init.sqf** then create a additional file called for example **DisablePanels.sqf**, then copy all or one of the codes down below in to the **DisablePanels.sqf**. After that head over to your newly created **init.sqf** and copy & paste this in there:&#x20;

```sqf
[] execVM "DisablePanels.sqf";
```
{% endstep %}
{% endstepper %}

{% tabs %}
{% tab title="Disable Panels Until Death" %}
This function disables all user interface panels for the player(s), until they die then they will work again.

```sqf
player enableInfoPanelComponent ["left", "MinimapDisplay", false];
player enableInfoPanelComponent ["right", "MinimapDisplay", false];
player enableInfoPanelComponent ["left", "MineDetectorDisplayComponent", false];
player enableInfoPanelComponent ["right", "MineDetectorDisplayComponent", false];
player enableInfoPanelComponent ["left", "MinimapDisplayComponent", false];
player enableInfoPanelComponent ["right", "MinimapDisplayComponent", false];
player enableInfoPanelComponent ["left", "CrewDisplayComponent", false];
player enableInfoPanelComponent ["right", "CrewDisplayComponent", false];
player enableInfoPanelComponent ["left", "TransportFeedDisplayComponent", false];
player enableInfoPanelComponent ["right", "TransportFeedDisplayComponent", false];
player enableInfoPanelComponent ["left", "SensorsDisplayComponent", false];
player enableInfoPanelComponent ["right", "SensorsDisplayComponent", false];
player enableInfoPanelComponent ["left", "SlingLoadDisplayComponent", false];
player enableInfoPanelComponent ["right", "SlingLoadDisplayComponent", false];
player enableInfoPanelComponent ["left", "UAVFeedDisplayComponent", false];
player enableInfoPanelComponent ["right", "UAVFeedDisplayComponent", false];
```
{% endtab %}

{% tab title="Disable Panels Forever" %}
This function disables all user interface panels for the player(s), they will stay disabled even after the player has died and respawned.

```sqf
["CAManBase", "InitPost", {
    params ["_unit"];
    _unit enableInfoPanelComponent ["left", "MinimapDisplay", false];
    _unit enableInfoPanelComponent ["right", "MinimapDisplay", false];
    _unit enableInfoPanelComponent ["left", "MineDetectorDisplayComponent", false];
    _unit enableInfoPanelComponent ["right", "MineDetectorDisplayComponent", false];
    _unit enableInfoPanelComponent ["left", "MinimapDisplayComponent", false];
    _unit enableInfoPanelComponent ["right", "MinimapDisplayComponent", false];
    _unit enableInfoPanelComponent ["left", "CrewDisplayComponent", false];
    _unit enableInfoPanelComponent ["right", "CrewDisplayComponent", false];
    _unit enableInfoPanelComponent ["left", "TransportFeedDisplayComponent", false];
    _unit enableInfoPanelComponent ["right", "TransportFeedDisplayComponent", false];
    _unit enableInfoPanelComponent ["left", "SensorsDisplayComponent", false];
    _unit enableInfoPanelComponent ["right", "SensorsDisplayComponent", false];
    _unit enableInfoPanelComponent ["left", "SlingLoadDisplayComponent", false];
    _unit enableInfoPanelComponent ["right", "SlingLoadDisplayComponent", false];
    _unit enableInfoPanelComponent ["left", "UAVFeedDisplayComponent", false];
    _unit enableInfoPanelComponent ["right", "UAVFeedDisplayComponent", false];
}, nil, nil, true] call CBA_fnc_addClassEventHandler;
```
{% endtab %}

{% tab title="Disable Panels In Vehicles" %}
This function disables all user interface panels for the player(s) in vehicles.

```sqf
["All", "InitPost", {
    params ["_vehicle"];
    _vehicle enableInfoPanelComponent ["left", "MineDetectorDisplay", false];
    _vehicle enableInfoPanelComponent ["right", "MineDetectorDisplay", false];
    _vehicle enableInfoPanelComponent ["left", "CrewDisplayComponent", false];
    _vehicle enableInfoPanelComponent ["right", "CrewDisplayComponent", false];
    _vehicle enableInfoPanelComponent ["left", "MinimapDisplay", false];
    _vehicle enableInfoPanelComponent ["right", "MinimapDisplay", false];
    _vehicle enableInfoPanelComponent ["left", "TransportFeedDisplayComponent", false];
    _vehicle enableInfoPanelComponent ["right", "TransportFeedDisplayComponent", false];
    _vehicle enableInfoPanelComponent ["left", "UAVFeedDisplayComponent", false];
    _vehicle enableInfoPanelComponent ["right", "UAVFeedDisplayComponent", false];
}, true, [], true] call CBA_fnc_addClassEventHandler;
```
{% endtab %}
{% endtabs %}

### Panel Properties

<table><thead><tr><th width="283">Class</th><th width="328">ComponentType</th><th>Type</th></tr></thead><tbody><tr><td><mark style="color:blue;"><code>MinimapDisplay</code></mark></td><td><mark style="color:red;"><code>MinimapDisplayComponent</code></mark></td><td>NAV</td></tr><tr><td><mark style="color:blue;"><code>SlingLoadDisplay</code></mark></td><td><mark style="color:red;"><code>SlingLoadDisplayComponent</code></mark></td><td>SLA</td></tr><tr><td><mark style="color:blue;"><code>SensorsDisplay</code></mark></td><td><mark style="color:red;"><code>SensorsDisplayComponent</code></mark></td><td>SENS</td></tr><tr><td><mark style="color:blue;"><code>UAVFeedDisplay</code></mark></td><td><mark style="color:red;"><code>UAVFeedDisplayComponent</code></mark></td><td>CAM Drone</td></tr><tr><td><mark style="color:blue;"><code>VehicleDriverDisplay</code></mark></td><td><mark style="color:red;"><code>TransportFeedDisplayComponent</code></mark></td><td>CAM Driver</td></tr><tr><td><mark style="color:blue;"><code>VehicleGunnerDisplay</code></mark></td><td><mark style="color:red;"><code>TransportFeedDisplayComponent</code></mark></td><td>CAM Gunner</td></tr><tr><td><mark style="color:blue;"><code>VehicleCommanderDisplay</code></mark></td><td><mark style="color:red;"><code>TransportFeedDisplayComponent</code></mark></td><td>CAM Commander</td></tr><tr><td><mark style="color:blue;"><code>MissileDisplay</code></mark></td><td><mark style="color:red;"><code>TransportFeedDisplayComponent</code></mark></td><td>CAM Missile</td></tr><tr><td><mark style="color:blue;"><code>CrewDisplay</code></mark></td><td><mark style="color:red;"><code>CrewDisplayComponent</code></mark></td><td>CREW</td></tr><tr><td><mark style="color:blue;"><code>MineDetectorDisplay</code></mark></td><td><mark style="color:red;"><code>MineDetectorDisplayComponent</code></mark></td><td></td></tr></tbody></table>

> UI window elements that encompass various display modules and gadgets. \
> [Arma 3: Custom Info](https://community.bistudio.com/wiki/Arma_3:_Custom_Info)
>
> Vehicle and ammo sensors for target detection and tracking. \
> [Arma 3: Sensors](https://community.bistudio.com/wiki/Arma_3:_Sensors) & [Arma 3: Sensors config reference](https://community.bistudio.com/wiki/Arma_3:_Sensors_config_reference)
