*Статья о том, как переопредилять файлы, из стандартного Epoch, в Вашу миссию - http://rnrportal.ru/...-мода-в-миссию/
- Откройте файл fn_selfAction.sqf
- Найдите в нем такую строку: //Repairing Vehicles
- Выше нее добавьте код:
_clothesTaken = cursorTarget getVariable["clothesTaken",false];
if (isNil "_clothesTaken") then
{_clothesTaken = false;};
if (isNil "s_player_clothes") then
{s_player_clothes = -1};
if (_isMan && !_isAlive && !_isZombie && !_clothesTaken && !_isAnimal && (speed player <= 1)) then
{
if (s_player_clothes < 0) then
{s_player_clothes = player addAction [("<t color='#0096ff'>")+("Снять одежду")+("</t>"), "custom\player_takeClothes.sqf",cursorTarget, -10, false, true, "",""];};
}
else
{
player removeAction s_player_clothes;
s_player_clothes = -1;
};- В папке Вашей миссии, создайте папку custom
- В папке custom, создайте файл(в блокноте): player_takeClothes.sqf
- Скопируйте в него данный код:
private["_itemNew","_onLadder","_skin","_body","_okSkin","_clothesTaken","_itemNewName","_result"];
_body = _this select 3;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
if (_onLadder) exitWith {cutText ["Вы не можете использовать данную опцию, находясь на лестнице!" , "PLAIN DOWN"]};
if (vehicle player != player) exitWith {cutText ["Вы не можете снимать с тел одежду, находясь в технике.", "PLAIN DOWN"]};
player removeAction s_player_clothes;
s_player_clothes = -1;
_skin = (typeOf _body);
_itemNew = _skin;
switch (_itemNew) do
{
case "Survivor3_DZ":
{_itemNew = "Survivor2_DZ";};
case "Bandit1_DZ":
{_itemNew = "Survivor2_DZ";};
};
_itemNew = "Skin_" + _itemNew;
_okSkin = isClass (configFile >> "CfgMagazines" >> _itemNew);
if(_okSkin) then
{
player playActionNow "Medic";
sleep 3;
_clothesTaken = _body getVariable["clothesTaken",false];
if(!_clothesTaken) then
{
_itemNewName = getText (configFile >> "CfgMagazines" >> _itemNew >> "displayName");
_result = [player,_itemNew] call BIS_fnc_invAdd;
if (_result) then
{
_body setVariable["clothesTaken",true,true];
cutText [format["%1 добавлен в инвентарь!",_itemNewName], "PLAIN DOWN"];
}
else
{cutText [format["У Вас нет места в инвентаре для %1 :(",_itemNewName], "PLAIN DOWN"];};
}
else
{cutText ["Одежду уже сняли с тела!", "PLAIN DOWN"];};
}
else
{cutText [format["Нельзя снять %1.",_skin], "PLAIN DOWN"];};
*Не забывайте сохранять созданные вами файлы в кодировке UTF8, для нормального отображения Русского языка.











