Tweaked RemoveTrees Script

This commit is contained in:
He-Man 2019-09-04 22:14:37 +02:00
parent def01a15e6
commit 9bf1807b18

View File

@ -1,12 +1,10 @@
_pos = getpos player;
_alltrees = nearestobjects [_pos,[],25];
_nearobjs = nearestobjects [_pos,[],25];
{
_pinus = ['pinus',str _x] call BIS_fnc_inString;
_ficus = ['ficus',str _x] call BIS_fnc_inString;
_wreck = ['wreck',str _x] call BIS_fnc_inString;
_stone = ['stone',str _x] call BIS_fnc_inString;
if (_pinus || _ficus || _wreck || _stone) then {
_x hideObjectGlobal true;
};
} foreach _alltrees;
_obj = _x;
{
if (tolower (str _obj) find _x > -1) exitwith {
_obj hideObjectGlobal true;
};
} foreach ["pinus","ficus","wreck","stone"];
} foreach _nearobjs;