add distance to action

This commit is contained in:
LinkIsGrim 2023-11-11 09:53:44 -03:00
parent cf8c847811
commit 06d0ee0491

View File

@ -25,6 +25,8 @@ _vehicles apply {
private _ownerName = [_x, true] call EFUNC(common,getName); private _ownerName = [_x, true] call EFUNC(common,getName);
if ("" != _ownerName) then { if ("" != _ownerName) then {
_name = format ["%1 (%2)", _name, _ownerName]; _name = format ["%1 (%2)", _name, _ownerName];
} else {
_name = format ["%1 (%2m)", _name, (ACE_player distance _x) toFixed 1];
}; };
private _icon = [_x] call EFUNC(common,getVehicleIcon); private _icon = [_x] call EFUNC(common,getVehicleIcon);
private _action = [format ["%1", _x], _name, _icon, _statement, {true}, {}, _x] call EFUNC(interact_menu,createAction); private _action = [format ["%1", _x], _name, _icon, _statement, {true}, {}, _x] call EFUNC(interact_menu,createAction);