Files
DayZ-Epoch/SQF/dayz_code/actions/AdvancedTrading/functions/z_at_checkCloseVehicle.sqf
icomrade 55f3a9dc79 Vehicle selling for advanced trading
This should work fairly okay but I expect there may be a couple exploits
and glitches
2016-04-28 18:35:03 -04:00

18 lines
508 B
Plaintext

private ["_vehicle","_list","_result"];
Z_vehicle = objNull;
_vehicle = objNull;
_list = nearestObjects [(getPosATL player), ["AllVehicles"], Z_VehicleDistance];
{
if(!isNull _x && local _x && !isPlayer _x && alive _x && !(_x isKindOf "zZombie_base"))then{
_vehicle = _x;
};
}count _list;
_result = false;
if(!isNull _vehicle)then{
Z_vehicle = _vehicle;
systemChat format["Selected %1",typeOf Z_vehicle];
_result = true;
[format["Buying in %1.", typeOf Z_vehicle]] call Z_filleTradeTitle;
};
_result