Skip to content

Instantly share code, notes, and snippets.

@Benargee
Created May 16, 2020 00:12
Show Gist options
  • Save Benargee/bf6f55b740643c26ac1b510fc6cb6d23 to your computer and use it in GitHub Desktop.
Save Benargee/bf6f55b740643c26ac1b510fc6cb6d23 to your computer and use it in GitHub Desktop.
systemChat "Dump start";
_weaponCfgs = configfile >> "CfgWeapons";
_cfgCount = count _weaponCfgs;
_primaryStr = "";
_secondaryStr = "";
_launcherStr = "";
_exportStr = "";
for [{ _i = 0 }, { _i < (_cfgCount -1) }, { _i = _i + 1 }] do {
_weaponCfg = _weaponCfgs select _i;
if ((getNumber (_weaponCfg >> "scope") == 2)) then {
_clsname = configName _weaponCfg;
if (getText (_weaponCfg >> "baseWeapon") == (_clsname)) then {
_type = getNumber (_weaponCfg >> "type");
switch (_type) do {
case 1:{
_primaryStr = _primaryStr + _clsname + endl;
};
case 2:{
_secondaryStr = _secondaryStr + _clsname + endl;
};
case 4:{
_launcherStr = _launcherStr + _clsname + endl;
};
default { };
}
}
}
};
_exportStr = _primaryStr + _secondaryStr + _launcherStr;
copyToClipboard _exportStr;
systemChat "Dump finish";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment