version 3.1.0
This commit is contained in:
40
functions/server/fn_logPlayerInventory.sqf
Normal file
40
functions/server/fn_logPlayerInventory.sqf
Normal file
@@ -0,0 +1,40 @@
|
||||
|
||||
params [
|
||||
["_player", objNull, [objNull]]
|
||||
];
|
||||
|
||||
if (!isPlayer _player) exitWith { diag_log("exitWith inventotry")};
|
||||
|
||||
_items = [];
|
||||
_items append uniformItems _player;
|
||||
_items append vestItems _player;
|
||||
_items append backpackItems _player;
|
||||
_items pushback hmd _player;
|
||||
_items pushback binocular _player;
|
||||
_items append primaryWeaponItems _player;
|
||||
|
||||
{
|
||||
_item = _x;
|
||||
_modes = getArray(configfile >> "CfgWeapons" >> _item >> "visionMode");
|
||||
|
||||
_subModes = [configfile >> "CfgWeapons" >> _item >> "ItemInfo" >> "OpticsModes", 1] call BIS_fnc_returnChildren;
|
||||
|
||||
{
|
||||
_modes append getArray( _x >> "visionMode" );
|
||||
} forEach _subModes;
|
||||
|
||||
_restrictedItemList = ["A3_GPNVG18b_REC_TI","A3_GPNVG18_REC_TI","A3_GPNVG18b_TI","A3_GPNVG18_TI","A3_GPNVG18b_REC_BLK_TI","A3_GPNVG18_REC_BLK_TI","A3_GPNVG18b_BLK_TI","A3_GPNVG18_BLK_TI","NVGogglesB_gry_F","NVGogglesB_grn_F","NVGogglesB_blk_F","optic_Nightstalker","rhsusf_acc_anpas13gv1","Tier1_ANPVS10_Tan","rhsusf_acc_anpvs27","optic_tws_mg","optic_tws"];
|
||||
|
||||
if ( _x in _restrictedItemList ) then {
|
||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 has a restricted inventory item: %2", name _player, getText( configfile >> "CfgWeapons" >> _item >> "displayName" )];
|
||||
} else if ((count _modes) isNotEqualTo 0) then {
|
||||
_modes = _modes apply { toLower _x };
|
||||
if ( "ti" in _modes ) then {
|
||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 has an unlisted thermal item: %2", name _player, getText( configfile >> "CfgWeapons" >> _item >> "displayName" )];
|
||||
};
|
||||
} else {
|
||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 inventory in compliance", name _player];
|
||||
}
|
||||
} forEach _items;
|
||||
|
||||
nil
|
||||
Reference in New Issue
Block a user