Skip to content

Adding Headgear to the Whitelist

Jonas Schade edited this page Oct 14, 2022 · 4 revisions

Whitelist? What Whitelist?

GRAD SlingHelmet implements a "Whitelist" for supported headgear. This way we can make sure the attachment of the slung helmet doesn't look odd. We can't possibly add every helmet of every Arma 3 mod by ourselves so we provided four different ways to whitelist headgear:

  1. Adding to the whitelist included in the mod
  2. Adding via config entry
  3. Adding via script
  4. Adding via CBA Settings

Selecting helmets with HelPAss

To sort through helmets quickly you can use the helmet picking assistant included in the mod.

Adding to the whitelist included in the mod

Of course you can add your classnames directly to our included list of supported helmets. This will ensure that everyone who has GRAD SlingHelmet loaded can sling those helmets without any further scripting in the mission. So everyone can profit from the time you spent looking for the classnames. This is really handy for mod creators who want to ensure compatibility, or if you find a helmet that you think we overlooked and should be able to be slung.

A list of all currently supported helmets can be found here.

If you want to save us work and time you can just open a pull request where you added the classnames to the allowedHeadgear.hpp. If that is too much work for you or you don't know how to open a Pull request and you're too lazy to use Google, please send us the classnames in the following format. (including quotation marks and commas)

"classname1",
"classname2",
"classname3",

Adding via config entry

Another method mod creators can use to whitelist their headgear is by adding the grad_slingHelmet_allow=true; entry in the config of the helmet.

class CfgWeapons
{
    [...]
    class headgear
    {
        [...]
        grad_slingHelmet_allow = true;
        [...]
    };
    [...]
};

Adding via script

The third option to whitelist a helmet is by using the provided function. This solution is intended for those mission creators who just need a specific helmet whitelisted for a specific mission. You just need to execute GRAD_slingHelmet_fnc_addHelmetToWhitelist on any client (it will be executed on the server and sent to every client in any case).
So you could just add the following to your initServer.sqf to whitelist the classname "Helmet1":

["Helmet1"] call GRAD_slingHelmet_fnc_addHelmetToWhitelist;

You can find further documentation for the function here.

Adding via CBA Settings

In version 1.1 we added functionality to add headgear to the whitelist via CBA Settings. Those can be found in your ADDON OPTIONS (Addon: "GRAD slingHelmet'). There are two settings:

  • Allow any headgear: Should be self explanatory 😉
  • Additional whitelist: Classnames of headgear to be whitelisted. Please note the correct syntax: "Helmet1", "Helmet2" (Similar to a normal array, but without the square brackets. Classnames with quotation marks and separated by a comma)