sounds.zip 9,01К
297 Количество загрузок:2. Создайте папку "custom" в папке вашей миссии
3. Распакуйте ваш "dayz_code.bpo", возьмите оттуда 3 файла
...\dayz_code\compile\fn_gearMenuChecks.sqf, ...dayz_code\compile\local_lockUnlock.sqf и ...\dayz_code\compile\ui_selectSlot.sqf
и поместите в папку "custom" вашей миссии
4. Откройте ...\MPMissions\DayZ_Epoch_24.Napf\custom\local_lockUnlock.sqf и найдите:
} else {
_vehicle setVehicleLock "UNLOCKED";
замените на:
player action ["lightOn", _vehicle];
_nul = [objNull, _vehicle, rSAY, "carLock", _sounddist] call RE;
sleep 0.5;
player action ["lightOff", _vehicle];
} else {
_vehicle setVehicleLock "UNLOCKED";
player action ["lightOn", _vehicle];
_nul = [objNull, _vehicle, rSAY, "carLock", _sounddist] call RE;
sleep 0.5;
player action ["lightOff", _vehicle];
5. Откройте ...\MPMissions\DayZ_Epoch_24.Napf\custom\ui_selectSlot.sqf и найдите: private ["_control","_button","_parent","_group","_pos","_item","_conf","_name","_cfgActions","_numActions","_height","_menu","_config","_type","_script","_outputOriented","_compile","_array","_outputClass","_outputType"];
и замените на:
private ["_control","_button","_parent","_group","_pos","_item","_conf","_name","_cfgActions","_numActions","_height","_menu","_config","_type","_script","_outputOriented","_compile","_array","_outputClass","_outputType","_key_colors","_ownerKeyId","_itemsPlayer","_hasKey","_objects","_ownerID","_i"];6. Там же найдите:
_pos set [3,_height];
и добавьте выше:
_itemsPlayer = items player;
_temp_keys = [];
_temp_keys_names = [];
// find available keys
_key_colors = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"];
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _item)) in _key_colors) then {
_ownerKeyId = getNumber(configFile >> "CfgWeapons" >> _item >> "keyid");
_ownerKeyName = getText(configFile >> "CfgWeapons" >> _item >> "displayName");
_temp_keys_names set [_ownerKeyId,_ownerKeyName];
_objects = nearestObjects [getPos player, ["LandVehicle","Helicopter","Plane","Ship"], 50];
_i = 0;
{
if (alive _x) then {
_ownerID = _x getVariable ["CharacterID", "0"];
_hasKey = (_ownerID == str(_ownerKeyId));
_oldOwner = (_ownerID == dayz_playerUID);
if(_hasKey or _oldOwner) then {
if(locked _x) then {
//Unlock
_menu = _parent displayCtrl (1600 + _numActions);
_menu ctrlShow true;
_text = "Unlock";
_script = "[""" + _ownerID + """] execVM ""scripts\remote_unlock.sqf""";
_height = _height + (0.025 * safezoneH);
uiNamespace setVariable ['uiControl', _control];
_menu ctrlSetText _text;
_menu ctrlSetEventHandler ["Buttonclick",_script];
} else {
//Lock
_menu = _parent displayCtrl (1600 + _numActions);
_menu ctrlShow true;
_text = "Lock";
_script = "[""" + _ownerID + """] execVM ""scripts\remote_lock.sqf""";
_height = _height + (0.025 * safezoneH);
uiNamespace setVariable ['uiControl', _control];
_menu ctrlSetText _text;
_menu ctrlSetEventHandler ["Buttonclick",_script];
};
//Engine start
_menu = _parent displayCtrl (1600 + _numActions + 1);
_menu ctrlShow true;
_text = "Engine";
_script = "[""" + _ownerID + """] execVM ""scripts\remote_engine.sqf""";
_height = _height + (0.025 * safezoneH);
uiNamespace setVariable ['uiControl', _control];
_menu ctrlSetText _text;
_menu ctrlSetEventHandler ["Buttonclick",_script];
};
_i = _i + 1;
};
} forEach _objects;
};
7. Откройте ...\MPMissions\DayZ_Epoch_24.Napf\custom\fn_gearMenuChecks.sqf и найдите:
if((locked _cTarget) && _isOk && (((vehicle player) distance _cTarget) < 12)) then {
и замените на:if((locked _cTarget) && _isOk && !_inVehicle && (((vehicle player) distance _cTarget) < 12)) then {
8. Создайте файл "remote_lock.sqf", в папке "scripts" вашей миссии, с таким содержанием:
private ["_ownerID","_objects","_i","_ownerID2","_vehicle"];
_ownerID = _this select 0;
_objects = nearestObjects [getPos player, ["LandVehicle","Helicopter","Plane","Ship"], 50];
_i = 0;
{
_vehicle = _x;
if (alive _vehicle) then {
_ownerID2 = _vehicle getVariable ["CharacterID", "0"];
if(_ownerID == _ownerID2) then {
if(!locked _vehicle) then {
if(player distance _vehicle < 50) then {
DZE_ActionInProgress = true;
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
s_player_lockUnlock_crtl = 1;
PVDZE_veh_Lock = [_vehicle,true];
if (local _vehicle) then {
PVDZE_veh_Lock spawn local_lockUnlock
} else {
publicVariable "PVDZE_veh_Lock";
};
titleText ["Ваш транспорт закрыт","PLAIN DOWN"];
s_player_lockUnlock_crtl = -1;
DZE_ActionInProgress = false;
};
};
};
_i = _i + 1;
};
} forEach _objects;
9. Создайте файл "remote_unlock.sqf", в папке "scripts" вашей миссии, с таким содержанием:
private ["_ownerID","_objects","_i","_ownerID2","_vehicle"];
_ownerID = _this select 0;
_objects = nearestObjects [getPos player, ["LandVehicle","Helicopter","Plane","Ship"], 50];
_i = 0;
{
_vehicle = _x;
if (alive _vehicle) then {
_ownerID2 = _vehicle getVariable ["CharacterID", "0"];
if(_ownerID == _ownerID2) then {
if(locked _vehicle) then {
if(player distance _vehicle < 50) then {
DZE_ActionInProgress = true;
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
s_player_lockUnlock_crtl = 1;
PVDZE_veh_Lock = [_vehicle,false];
if (local _vehicle) then {
PVDZE_veh_Lock spawn local_lockUnlock
} else {
publicVariable "PVDZE_veh_Lock";
};
titleText ["Ваш транспорт открыт","PLAIN DOWN"];
s_player_lockUnlock_crtl = -1;
DZE_ActionInProgress = false;
};
};
};
_i = _i + 1;
};
} forEach _objects;
10. Создайте файл "remote_engine.sqf", в папке "scripts" вашей миссии, с таким содержанием:
private ["_ownerID","_objects","_i","_ownerID2","_vehicle","_driver","_aigroup"];
_ownerID = _this select 0;
_objects = nearestObjects [getPos player, ["LandVehicle","Helicopter","Plane","Ship"], 50];
_i = 0;
{
_vehicle = _x;
if (alive _vehicle) then {
_ownerID2 = _vehicle getVariable ["CharacterID", "0"];
if(_ownerID == _ownerID2) then {
if(!locked _vehicle) then {
if(player distance _vehicle < 50) then {
DZE_ActionInProgress = true;
if (isEngineOn _vehicle) then {
player action ["engineOff", _vehicle];
} else {
player action ["engineOn", _vehicle];
};
player action ["engineOn", _vehicle];
DZE_ActionInProgress = false;
};
};
};
_i = _i + 1;
};
} forEach _objects;
11. Откройте ...\MPMissions\DayZ_Epoch_24.Napf\custom\compiles.sqf и найдите:player_selectSlot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf";
замените на:
player_selectSlot = compile preprocessFileLineNumbers "custom\ui_selectSlot.sqf";
найдите:
fn_gearMenuChecks = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_gearMenuChecks.sqf";
замените на:
fn_gearMenuChecks = compile preprocessFileLineNumbers "custom\fn_gearMenuChecks.sqf";найдите:
local_lockUnlock = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_lockUnlock.sqf";
замените на:
local_lockUnlock = compile preprocessFileLineNumbers "custom\local_lockUnlock.sqf";12. Откройте ...\MPMissions\DayZ_Epoch_24.Napf\description.ext и найдите:
class RscLoadingText : RscTextдобавьте выше:
class CfgSounds
{
sounds[] =
{
carLock
};
class carLock
{
name="carLock";
sound[] = {"sounds\carlock.ogg",0.9,1};
titles[] = {};
};
};
Все готово,пользуемся)











