This commit is contained in:
2022-04-21 16:15:41 +03:00
commit 9d4fc88901
601 changed files with 66252 additions and 0 deletions

View File

@ -0,0 +1,13 @@
if (LOG_INPROGRESS) then{
[STR_LOG_INPROGRESS,COLOR_ERROR] call SAM_SAYS;
}else{
LOG_INPROGRESS = true;
private ["_carrier","_object"];
_carrier = _this select 0;
_object = _carrier getVariable "LOG_heliporte";
_carrier setVariable ["LOG_heliporte", objNull, true];
_object setVariable ["LOG_moves_by", objNull, true];
[_object] call LOG_FNCT_DETACH_AND_SAVE;
[format [STR_LOG_DROPPED, getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "displayName")],COLOR_SUCCESS] call SAM_SAYS;
LOG_INPROGRESS = false;
};

View File

@ -0,0 +1,8 @@
private ["_carrier","_disabled","_object"];
_carrier = _this select 0;
_disabled = _carrier getVariable "LOG_disabled";
if (isNil "_disabled") then{ _carrier setVariable ["LOG_disabled",false];};
_object = _carrier getVariable "LOG_heliporte";
if (isNil "_object") then{ _carrier setVariable ["LOG_heliporte",objNull,false];};
_carrier addAction [("<t color='#dddd00'>" + STR_LOG_LIFT + "</t>"),"logistic\lift\lift.sqf",[],0,true,true,"","LOG_OBJECT_ADDACTION == _target && LOG_HELI_LIFT_VALID"];
_carrier addAction [("<t color='#dddd00'>" + STR_LOG_DROP + "</t>"),"logistic\lift\drop.sqf",[],0,true,true,"","LOG_OBJECT_ADDACTION == _target && LOG_HELI_DROP_VALID"];

View File

@ -0,0 +1,35 @@
if (LOG_INPROGRESS) then{
[STR_LOG_INPROGRESS,COLOR_ERROR] call SAM_SAYS;
} else {
LOG_INPROGRESS = true;
private ["_heliporteur", "_object","_name"];
_heliporteur = _this select 0;
_object = nearestObjects [_heliporteur, LOG_CFG_ISLIFTABLE, 20];
_object = _object - [_heliporteur];
if (count _object > 0) then{
_object = _object select 0;
_name = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "displayName");
if !([_object] call LOG_FNCT_LOCKED) exitWith {LOG_INPROGRESS = false;};
if !(_object getVariable "LOG_disabled") then {
if (isNull (_object getVariable "LOG_moves_by")) then {
if (count crew _object == 0) then{
if (isNull (_object getVariable "LOG_moves_by") || (!alive (_object getVariable "LOG_moves_by"))) then{
private ["_no_trailer", "_trailer"];
_no_trailer = true;
_trailer = _object getVariable "LOG_trailer";
if !(isNil "_trailer") then{
if !(isNull _trailer) then{ _no_trailer = false;};
};
if (_no_trailer) then{
_heliporteur setVariable ["LOG_heliporte", _object, true];
_object setVariable ["LOG_moves_by", _heliporteur, true];
_object attachTo [_heliporteur, [0,0,(boundingBox _heliporteur select 0 select 2) - (boundingBox _object select 0 select 2) - (getPos _heliporteur select 2) + 0.5]];
[ format [STR_LOG_ATTACHED,_name], COLOR_SUCCESS] call SAM_SAYS;
}else{ [ format [STR_LOG_CANT_LIFT_TOWING,_name],COLOR_ERROR] call SAM_SAYS;};
}else{[ format [STR_LOG_CANT_LIFT_MOVING,_name],COLOR_ERROR] call SAM_SAYS;};
}else{[ format [STR_LOG_CANT_LIFT_PLAYER,_name],COLOR_ERROR] call SAM_SAYS;};
}else{[ format [STR_LOG_ALREADY, _name],COLOR_ERROR] call SAM_SAYS;};
};
};
LOG_INPROGRESS = false;
};