mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-27 18:21:50 +03:00
Use better method to find player's vehicle in Advanced Trading #1725
This commit is contained in:
@@ -4,11 +4,11 @@ Z_vehicle = objNull;
|
||||
_vehicle = objNull;
|
||||
_pos = [player] call FNC_GetPos;
|
||||
_list = nearestObjects [_pos, ["Air","LandVehicle","Ship"], Z_VehicleDistance];
|
||||
{
|
||||
if (!isNull _x && local _x && alive _x) then {
|
||||
_vehicle = _x;
|
||||
};
|
||||
} count _list;
|
||||
|
||||
if (!isNull DZE_myVehicle && local DZE_myVehicle && alive DZE_myVehicle && DZE_myVehicle in _list) then {
|
||||
_vehicle = DZE_myVehicle;
|
||||
};
|
||||
|
||||
_result = false;
|
||||
|
||||
if (!isNull _vehicle) then {
|
||||
|
||||
Reference in New Issue
Block a user