Skip to content

Commit

Permalink
Added possible fix for arsenal whitelist were not created on first lo…
Browse files Browse the repository at this point in the history
…ad in to server (#1177)
  • Loading branch information
pool011 authored Apr 12, 2024
2 parents c2aa439 + bfb59e8 commit 016a7bc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cScripts/functions/systems/fn_getArsenalWhitelist.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* call cScripts_fnc_getArsenalWhitelist;
*/

waitUntil {!isNull player && player == player};

private _classname = [player] call EFUNC(gear,getLoadoutName);
if !(isClass (missionConfigFile >> "CfgLoadouts" >> _classname)) exitWith {
SHOW_CHAT_WARNING_1("ArsenalWhitelist", "Loadout '%1' does not exist inside of mission config. No whitelist will be created.", _classname);
Expand Down Expand Up @@ -118,4 +120,6 @@ private _launcherSpecific = switch (true) do {

private _whitelist = _commonGear + _unitItems + _orgItems + _roleSpecific + _primarySpecific + _handgunSpecific + _launcherSpecific;

INFO_2("Arsenal", "Whitelist created for %1 [%2].",player,typeof player);

_whitelist

0 comments on commit 016a7bc

Please sign in to comment.