You've already forked arma2-epoch-server
Initial
This commit is contained in:
52
MPMissions/DayZ_Epoch_24.Napf/logistic/monitor/monitor_action.sqf
Executable file
52
MPMissions/DayZ_Epoch_24.Napf/logistic/monitor/monitor_action.sqf
Executable file
@ -0,0 +1,52 @@
|
||||
private ["_target"];
|
||||
while {true} do{
|
||||
|
||||
LOG_OBJECT_ADDACTION = objNull;
|
||||
_target = cursorTarget;
|
||||
|
||||
if ( !(isNull _target) && ( player distance _target < 13 ) ) then{
|
||||
LOG_OBJECT_ADDACTION = _target;
|
||||
|
||||
if ({_target isKindOf _x} count LOG_CFG_ISTOWABLE > 0) then {
|
||||
LOG_OBJECT_TRAILER_VALID = (vehicle player == player && (alive _target) && (count crew _target == 0) &&
|
||||
isNull LOG_OBJECT_MOVES && isNull (_target getVariable "LOG_moves_by") &&
|
||||
(isNull (_target getVariable "LOG_moves_by") || (!alive (_target getVariable "LOG_moves_by"))) &&
|
||||
!(_target getVariable "LOG_disabled") && ( [_target] call LOG_FNCT_LOCKED ) && ( [_target,2] call LOG_FNCT_CHAINING ) );
|
||||
|
||||
LOG_DETACH_VALID = ( vehicle player == player && (isNull LOG_OBJECT_MOVES) && !isNull (_target getVariable "LOG_moves_by") && !(_target getVariable "LOG_disabled") );
|
||||
};
|
||||
|
||||
|
||||
if ({_target isKindOf _x} count LOG_CFG_CANTOW > 0) then {
|
||||
|
||||
LOG_TRAILER_MOVE_VALID = (vehicle player == player && (alive _target) && (!isNull LOG_OBJECT_MOVES) &&
|
||||
(alive LOG_OBJECT_MOVES) && !(LOG_OBJECT_MOVES getVariable "LOG_disabled") &&
|
||||
({LOG_OBJECT_MOVES isKindOf _x} count LOG_CFG_ISTOWABLE > 0) &&
|
||||
isNull (_target getVariable "LOG_trailer") && ([0,0,0] distance velocity _target < 6) &&
|
||||
(getPos _target select 2 < 2) && !(_target getVariable "LOG_disabled"));
|
||||
|
||||
LOG_TRAILER_SELECT_VALID = ( vehicle player == player && (alive _target) && (isNull LOG_OBJECT_MOVES) &&
|
||||
(!isNull LOG_OBJECT_SELECTION) && (LOG_OBJECT_SELECTION != _target) &&
|
||||
!(LOG_OBJECT_SELECTION getVariable "LOG_disabled") &&
|
||||
({LOG_OBJECT_SELECTION isKindOf _x} count LOG_CFG_ISTOWABLE > 0) &&
|
||||
isNull (_target getVariable "LOG_trailer") && ([0,0,0] distance velocity _target < 6) &&
|
||||
(getPos _target select 2 < 2) && !(_target getVariable "LOG_disabled") && ( [_target] call LOG_FNCT_LOCKED ) && ( [ _target,1] call LOG_FNCT_CHAINING ) );
|
||||
};
|
||||
};
|
||||
|
||||
if ({(vehicle player) isKindOf _x} count LOG_CFG_CANLIFT > 0) then{
|
||||
LOG_OBJECT_ADDACTION = vehicle player;
|
||||
LOG_TRAILER_MOVE_VALID = false;
|
||||
LOG_TRAILER_SELECT_VALID = false;
|
||||
|
||||
LOG_HELI_LIFT_VALID = (driver LOG_OBJECT_ADDACTION == player &&
|
||||
({_x != LOG_OBJECT_ADDACTION && !(_x getVariable "LOG_disabled") && [_x] call LOG_FNCT_LOCKED } count (nearestObjects [LOG_OBJECT_ADDACTION, LOG_CFG_ISLIFTABLE, 10]) > 0) &&
|
||||
isNull (LOG_OBJECT_ADDACTION getVariable "LOG_heliporte") && ([0,0,0] distance velocity LOG_OBJECT_ADDACTION < 8 ) && (getPos LOG_OBJECT_ADDACTION select 2 > 1) &&
|
||||
!(LOG_OBJECT_ADDACTION getVariable "LOG_disabled"));
|
||||
|
||||
LOG_HELI_DROP_VALID = (driver LOG_OBJECT_ADDACTION == player && !isNull (LOG_OBJECT_ADDACTION getVariable "LOG_heliporte") &&
|
||||
([0,0,0] distance velocity LOG_OBJECT_ADDACTION <= 10 ) && (getPos LOG_OBJECT_ADDACTION select 2 <= 40) && !(LOG_OBJECT_ADDACTION getVariable "LOG_disabled"));
|
||||
};
|
||||
|
||||
sleep 0.2;
|
||||
};
|
20
MPMissions/DayZ_Epoch_24.Napf/logistic/monitor/monitor_object.sqf
Executable file
20
MPMissions/DayZ_Epoch_24.Napf/logistic/monitor/monitor_object.sqf
Executable file
@ -0,0 +1,20 @@
|
||||
sleep 0.1;
|
||||
private ["_transportable","_known","_list","_count","_i","_object"];
|
||||
_transportable = LOG_CFG_ISTOWABLE + LOG_CFG_ISLIFTABLE;
|
||||
_known = [];
|
||||
while {true} do{
|
||||
if !(isNull player) then{
|
||||
_list = (vehicles + nearestObjects [player, ["Static"], 80]) - _known;
|
||||
_count = count _list;
|
||||
if (_count > 0) then{
|
||||
for [{_i = 0}, {_i < _count}, {_i = _i + 1}] do{
|
||||
_object = _list select _i;
|
||||
if ({_object isKindOf _x} count _transportable > 0) then{[_object] spawn LOG_OBJ_INIT;};//if look at
|
||||
if ({_object isKindOf _x} count LOG_CFG_CANLIFT > 0) then{[_object] spawn LOG_LIFT_INIT;};//if in
|
||||
if ({_object isKindOf _x} count LOG_CFG_CANTOW > 0) then{[_object] spawn LOG_TOW_INIT;};//if look at
|
||||
sleep (18/_count);
|
||||
};
|
||||
_known = _known + _list;
|
||||
}else{sleep 18;};
|
||||
}else{sleep 2;};
|
||||
};
|
Reference in New Issue
Block a user