Skip to content

Commit 016a7bc

Browse files
authored
Added possible fix for arsenal whitelist were not created on first load in to server (#1177)
2 parents c2aa439 + bfb59e8 commit 016a7bc

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cScripts/functions/systems/fn_getArsenalWhitelist.sqf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* call cScripts_fnc_getArsenalWhitelist;
1414
*/
1515

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

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

123+
INFO_2("Arsenal", "Whitelist created for %1 [%2].",player,typeof player);
124+
121125
_whitelist

0 commit comments

Comments
 (0)