Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added possible fix for arsenal whitelist were not created on first load in to server #1177

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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