mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
find lights experiment
This commit is contained in:
24
SQF/dayz_code/actions/player_findLights.sqf
Normal file
24
SQF/dayz_code/actions/player_findLights.sqf
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
DayZ Find lights
|
||||||
|
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||||
|
*/
|
||||||
|
private ["_objName","_lights","_findNearestlight"];
|
||||||
|
|
||||||
|
// allowed lights list move this later
|
||||||
|
_lights = ["lampa_ind_zebr.p3d","lampa_ind.p3d","lampa_sidl_3.p3d","lampa_sidl_2.p3d","lampa_sidl.p3d","powlines_concl.p3d","powlines_woodl.p3d"];
|
||||||
|
|
||||||
|
_findNearestlight = [];
|
||||||
|
{
|
||||||
|
if("" == typeOf _x) then {
|
||||||
|
|
||||||
|
if (alive _x) then {
|
||||||
|
|
||||||
|
_objName = _x call DZE_getModelName;
|
||||||
|
|
||||||
|
if (_objName in _lights) then {
|
||||||
|
_findNearestlight set [(count _findNearestlight),_x];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
} foreach nearestObjects [getPos player, [], 20];
|
||||||
Reference in New Issue
Block a user