Перейти к публикации
Поиск в
  • Дополнительно...
Искать результаты, содержащие...
Искать результаты в...
  • Нужна помощь?

    Создайте тему в соответствующем разделе
    Не нужно писать всё в чат!
  • Загляните на торговую площадку

    Там вы можете купить
    всё что касается игровых серверов
  • Не хотите бан?

    Пожалуйста, ознакомьтесь с нашими правилами
    Не нарушайте порядок!
  • Продаёте или покупаете?

    Пользуйтесь услугами гаранта
    Мы сделаем вашу сделку безопасной

Собсна поставил скрипт на снятие одежды. Проблема в том, что снимает он только скины армы. А скины овервотча пишет не поддерживает. Как сделать чтобы поддерживал все? Вот скрипт:

 

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 ["You can't perform this action while on a ladder" , "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";
    uiSleep 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["У вас нет места для a %1 :(",_itemNewName], "PLAIN DOWN"];
        };
    } else {
        cutText ["Эта одежда уже снята", "PLAIN DOWN"];
    };
} else {
    cutText [format["%1 не поддерживается",_skin], "PLAIN DOWN"];
};


И вот, что в fn_selfActions:

_clothesTaken = cursorTarget getVariable["clothesTaken",false];

 
    if (_isMan and !_isAlive and !_isZombie and !_clothesTaken) then {
        if (s_player_clothes < 0) then {
            s_player_clothes = player addAction [("Взять одежду")+("</t>"), "custom\player_takeClothes.sqf",cursorTarget, -10, false, true, "",""];
        };
    } else {
        player removeAction s_player_clothes;
        s_player_clothes = -1;
        };[/spoiler[
Изменено пользователем MisaAmane (история изменений)

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Рекомендованные сообщения

  • 0

Точно не знаю, но судя по твоей ошибке, в оверпоче видимо нет пакетов с такой одеждой, поэтому не поддерживается.

 

Исправить это можно, изменяя конфиги самого мода.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах



  • 0

Пробуй , замени весь код на етот 

 

 

player removeAction s_clothes;
s_clothes = -1;

_body = _this select 3;
_model = typeOf _body;

if( _model in Clothing1)then{_model = "FR_OHara_DZ"; //OK
}else{
if( _model in Clothing2)then{_model = "Soldier1_DZ";//OK
}else{
if( _model in Clothing3)then{_model = "Ins_Soldier_GL_DZ";//OK
}else{
if( _model in Clothing4)then{_model = "GUE_Soldier_Crew_DZ";//OK
}else{
if( _model in Clothing5)then{_model = "Graves_Light_DZ";//OK
}else{
if( _model in Clothing6)then{_model = "CZ_Special_Forces_GL_DES_EP1_DZ";//OK
}else{
if( _model in Clothing7)then{_model = "Bandit2_DZ";//OK
}else{
if( _model in Clothing8)then{_model = "Soldier_Bodyguard_AA12_PMC_DZ";//OK
}else{
if( _model in Clothing9)then{_model = "TK_INS_Soldier_EP1_DZ";//OK
}else{
if( _model in Clothing10)then{_model = "Survivor2_DZ";//OK
}else{
if( _model in Clothing11)then{_model = "FR_Rodriguez_DZ";//OK - Edit this one for normal arma. The rest coming is overwatch.
}else{////2
if( _model in Clothing12)then{_model = "Drake_Light_DZ";//OK
}else{////3
if( _model in Clothing13)then{_model = "Soldier_Sniper_PMC_DZ";//OK
}else{////4
if( _model in Clothing14)then{_model = "CZ_Soldier_Sniper_EP1_DZ";//OK
}else{////5
if( _model in Clothing15)then{_model = "Camo1_DZ";//OK
}else{////6
if( _model in Clothing16)then{_model = "Rocket_DZ";//OK
}else{////7
if( _model in Clothing17)then{_model = "Sniper1_DZ";//OK
}else{////8
if( _model in Clothing18)then{_model = "Soldier_TL_PMC_DZ";//OK
}else{////9
if( _model in Clothing19)then{_model = "GUE_Soldier_Sniper_DZ";//OK
}else{////10
if( _model in Clothing20)then{_model = "TK_INS_Warlord_EP1_DZ";//OK
}else{////11
if( _model in Clothing21)then{_model = "Bandit1_DZ";
}else{////12
if( _model in Clothing22)then{_model = "Bandit2_DZ";
}else{////13
if( _model in Clothing23)then{_model = "BanditW1_DZ";
}else{////14
if( _model in Clothing24)then{_model = "BanditW2_DZ";
}else{////15
if( _model in Clothing25)then{_model = "GUE_Commander_DZ";
}else{////16
if( _model in Clothing26)then{_model = "GUE_Soldier_2_DZ";
}else{////17
if( _model in Clothing27)then{_model = "GUE_Soldier_CO_DZ";
}else{////18
_model = _model;
};////18
};////17
};////16
};////15
};////14
};////13
};////12
};////11
};////10
};////9
};////8
};////7
};////6
};////5
};////4
};////3
};////2
};
};
};
};
};
};
};
};
};
};

_count = (({isPlayer _x} count (nearestObjects [player, ["CAManBase"], 5])) - 1);

switch (_model) do {
	case "Survivor3_DZ": {
		_model = "Survivor2_DZ";
	};
};

_isModel = _model in  AllPlayers;

if (_count > 0) exitWith {
	_txt = "You can't take clothes from a body when a player is within 5m of you!";
	cutText [_txt,"PLAIN DOWN"];
	systemChat ("Zupa: "+str _txt+"");
};
if !(_isModel) then {
	_txt = "These clothes can not be taken!";
	cutText [txt,"PLAIN DOWN"];
	systemChat ("Zupa: "+str _txt+"");
};
if (_model in ["Survivor2_DZ"]) then {
	_txt = "These clothes can not be taken!";
	cutText [txt,"PLAIN DOWN"];
	systemChat ("Zupa: "+str _txt+"");
};



if (_isModel &&  !(_model in ["Survivor2_DZ"])) then {
	_model = "Skin_" + _model;
	_result = [player,_model] call BIS_fnc_invAdd;
	if (_result) then {
		player playActionNow "PutDown";
		private["_name","_method"];
		_name = _body getVariable["bodyName","unknown"];
		_method = _body getVariable["deathType","unknown"];
		_money = _body getVariable["cashMoney",0];
		_class = "Survivor2_DZ";
		_position = getPosATL _body;
		_dir = getDir _body;
		//---------_currentAnim = animationState _body;
		private ["_weapons","_magazines","_primweapon","_secweapon"];
		_weapons = weapons _body;
		_primweapon = primaryWeapon _body;
		_secweapon = secondaryWeapon _body;
		if (!(_primweapon in _weapons) && _primweapon != "") then {_weapons = _weapons + [_primweapon];};
		if (!(_secweapon in _weapons) && _secweapon != "") then {_weapons = _weapons + [_secweapon];};
		_magazines = magazines _body;
		private ["_newBackpackType","_backpackWpn","_backpackMag"];
		dayz_myBackpack = unitBackpack _body;
		if (isNull (unitBackpack _body)) then {
			_hasBackPack = false;
		} else {
			_hasBackPack = true;
			_newBackpackType = typeOf dayz_myBackpack;
			_backpackWpn = getWeaponCargo dayz_myBackpack;
			_backpackMag = getMagazineCargo dayz_myBackpack;
		};
		_currentWpn = currentWeapon _body;
		_muzzles = getArray(configFile >> "cfgWeapons" >> _currentWpn >> "muzzles");
		if (count _muzzles > 1) then {_currentWpn = currentMuzzle _body;};
		_body setPosATL dayz_spawnPos;
		_oldUnit = _body;
		_group = createGroup west;
		_newUnit = _group createUnit [_class,position player,[],0,"NONE"];
		_newUnit setPosATL _position;
		_newUnit setDir _dir;
		{_newUnit removeMagazine _x;} forEach magazines _newUnit;
		removeAllWeapons _newUnit;
		{if (typeName _x == "ARRAY") then {_newUnit addMagazine [_x select 0,_x select 1];} else {_newUnit addMagazine _x;};} forEach _magazines;
		{_newUnit addWeapon _x;} forEach _weapons;
		if (str(_weapons) != str(weapons _newUnit)) then {
			{_weapons = _weapons - [_x];} forEach (weapons _newUnit);
			{_newUnit addWeapon _x;} forEach _weapons;
		};
		if (_primweapon != (primaryWeapon _newUnit)) then { _newUnit addWeapon _primweapon; };
		if (_secweapon != (secondaryWeapon _newUnit) && _secweapon != "") then { _newUnit addWeapon _secweapon; };
		if (_hasBackPack) then {
			_newUnit addBackpack _newBackpackType;
			_oldBackpack = dayz_myBackpack;
			dayz_myBackpack = unitBackpack _newUnit;
			_backpackWpnTypes = [];
			_backpackWpnQtys = [];
			if (count _backpackWpn > 0) then {
				_backpackWpnTypes = _backpackWpn select 0;
				_backpackWpnQtys = _backpackWpn select 1;
			};
			_countr = 0;
			{
				dayz_myBackpack addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];
				_countr = _countr + 1;
			} forEach _backpackWpnTypes;
			_backpackmagTypes = [];
			_backpackmagQtys = [];
			if (count _backpackmag > 0) then {
				_backpackmagTypes 	= _backpackMag select 0;
				_backpackmagQtys 	= _backpackMag select 1;
			};
			_countr = 0;
			{
				dayz_myBackpack addmagazineCargoGlobal [_x,(_backpackmagQtys select _countr)];
				_countr = _countr + 1;
			} forEach _backpackmagTypes;
		};
		removeAllWeapons _oldUnit;
		{
			_oldUnit removeMagazine _x;
		} forEach magazines _oldUnit;
		deleteVehicle _oldUnit;
		_oldUnit = nil;
		_newUnit setDamage 1;
		_newUnit setVariable["bodyName",_name,true];
		_newUnit setVariable["deathType",_method,true];
		_newUnit setVariable["cashMoney",_money,true];
	} else {cutText ["You need a free slot to take clothing.", "PLAIN DOWN"];};
}; 

 

 

 

 

В fn_selfActions  изменить свое на , 

 

//Remove CLOTHES
if (_isMan and !_isAlive and !_isZombie and !_isAnimal) then {
if (s_clothes < 0) then {
        s_clothes = player addAction [("<t color=""#0000FF"">"+("Take Clothes") + "</t>"), "ТВОЙ ПУТЬ\removeclothes.sqf",cursorTarget, 1, false, true, "",""];
    };
} else {
    player removeAction s_clothes;
    s_clothes = -1;
}; 

Но лучше найди 

// logic vars
	 

И сразу выше вставить 

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах
  • 0

Пробуй , замени весь код на етот 

 

 

player removeAction s_clothes;
s_clothes = -1;

_body = _this select 3;
_model = typeOf _body;

if( _model in Clothing1)then{_model = "FR_OHara_DZ"; //OK
}else{
if( _model in Clothing2)then{_model = "Soldier1_DZ";//OK
}else{
if( _model in Clothing3)then{_model = "Ins_Soldier_GL_DZ";//OK
}else{
if( _model in Clothing4)then{_model = "GUE_Soldier_Crew_DZ";//OK
}else{
if( _model in Clothing5)then{_model = "Graves_Light_DZ";//OK
}else{
if( _model in Clothing6)then{_model = "CZ_Special_Forces_GL_DES_EP1_DZ";//OK
}else{
if( _model in Clothing7)then{_model = "Bandit2_DZ";//OK
}else{
if( _model in Clothing8)then{_model = "Soldier_Bodyguard_AA12_PMC_DZ";//OK
}else{
if( _model in Clothing9)then{_model = "TK_INS_Soldier_EP1_DZ";//OK
}else{
if( _model in Clothing10)then{_model = "Survivor2_DZ";//OK
}else{
if( _model in Clothing11)then{_model = "FR_Rodriguez_DZ";//OK - Edit this one for normal arma. The rest coming is overwatch.
}else{////2
if( _model in Clothing12)then{_model = "Drake_Light_DZ";//OK
}else{////3
if( _model in Clothing13)then{_model = "Soldier_Sniper_PMC_DZ";//OK
}else{////4
if( _model in Clothing14)then{_model = "CZ_Soldier_Sniper_EP1_DZ";//OK
}else{////5
if( _model in Clothing15)then{_model = "Camo1_DZ";//OK
}else{////6
if( _model in Clothing16)then{_model = "Rocket_DZ";//OK
}else{////7
if( _model in Clothing17)then{_model = "Sniper1_DZ";//OK
}else{////8
if( _model in Clothing18)then{_model = "Soldier_TL_PMC_DZ";//OK
}else{////9
if( _model in Clothing19)then{_model = "GUE_Soldier_Sniper_DZ";//OK
}else{////10
if( _model in Clothing20)then{_model = "TK_INS_Warlord_EP1_DZ";//OK
}else{////11
if( _model in Clothing21)then{_model = "Bandit1_DZ";
}else{////12
if( _model in Clothing22)then{_model = "Bandit2_DZ";
}else{////13
if( _model in Clothing23)then{_model = "BanditW1_DZ";
}else{////14
if( _model in Clothing24)then{_model = "BanditW2_DZ";
}else{////15
if( _model in Clothing25)then{_model = "GUE_Commander_DZ";
}else{////16
if( _model in Clothing26)then{_model = "GUE_Soldier_2_DZ";
}else{////17
if( _model in Clothing27)then{_model = "GUE_Soldier_CO_DZ";
}else{////18
_model = _model;
};////18
};////17
};////16
};////15
};////14
};////13
};////12
};////11
};////10
};////9
};////8
};////7
};////6
};////5
};////4
};////3
};////2
};
};
};
};
};
};
};
};
};
};

_count = (({isPlayer _x} count (nearestObjects [player, ["CAManBase"], 5])) - 1);

switch (_model) do {
	case "Survivor3_DZ": {
		_model = "Survivor2_DZ";
	};
};

_isModel = _model in  AllPlayers;

if (_count > 0) exitWith {
	_txt = "You can't take clothes from a body when a player is within 5m of you!";
	cutText [_txt,"PLAIN DOWN"];
	systemChat ("Zupa: "+str _txt+"");
};
if !(_isModel) then {
	_txt = "These clothes can not be taken!";
	cutText [txt,"PLAIN DOWN"];
	systemChat ("Zupa: "+str _txt+"");
};
if (_model in ["Survivor2_DZ"]) then {
	_txt = "These clothes can not be taken!";
	cutText [txt,"PLAIN DOWN"];
	systemChat ("Zupa: "+str _txt+"");
};



if (_isModel &&  !(_model in ["Survivor2_DZ"])) then {
	_model = "Skin_" + _model;
	_result = [player,_model] call BIS_fnc_invAdd;
	if (_result) then {
		player playActionNow "PutDown";
		private["_name","_method"];
		_name = _body getVariable["bodyName","unknown"];
		_method = _body getVariable["deathType","unknown"];
		_money = _body getVariable["cashMoney",0];
		_class = "Survivor2_DZ";
		_position = getPosATL _body;
		_dir = getDir _body;
		//---------_currentAnim = animationState _body;
		private ["_weapons","_magazines","_primweapon","_secweapon"];
		_weapons = weapons _body;
		_primweapon = primaryWeapon _body;
		_secweapon = secondaryWeapon _body;
		if (!(_primweapon in _weapons) && _primweapon != "") then {_weapons = _weapons + [_primweapon];};
		if (!(_secweapon in _weapons) && _secweapon != "") then {_weapons = _weapons + [_secweapon];};
		_magazines = magazines _body;
		private ["_newBackpackType","_backpackWpn","_backpackMag"];
		dayz_myBackpack = unitBackpack _body;
		if (isNull (unitBackpack _body)) then {
			_hasBackPack = false;
		} else {
			_hasBackPack = true;
			_newBackpackType = typeOf dayz_myBackpack;
			_backpackWpn = getWeaponCargo dayz_myBackpack;
			_backpackMag = getMagazineCargo dayz_myBackpack;
		};
		_currentWpn = currentWeapon _body;
		_muzzles = getArray(configFile >> "cfgWeapons" >> _currentWpn >> "muzzles");
		if (count _muzzles > 1) then {_currentWpn = currentMuzzle _body;};
		_body setPosATL dayz_spawnPos;
		_oldUnit = _body;
		_group = createGroup west;
		_newUnit = _group createUnit [_class,position player,[],0,"NONE"];
		_newUnit setPosATL _position;
		_newUnit setDir _dir;
		{_newUnit removeMagazine _x;} forEach magazines _newUnit;
		removeAllWeapons _newUnit;
		{if (typeName _x == "ARRAY") then {_newUnit addMagazine [_x select 0,_x select 1];} else {_newUnit addMagazine _x;};} forEach _magazines;
		{_newUnit addWeapon _x;} forEach _weapons;
		if (str(_weapons) != str(weapons _newUnit)) then {
			{_weapons = _weapons - [_x];} forEach (weapons _newUnit);
			{_newUnit addWeapon _x;} forEach _weapons;
		};
		if (_primweapon != (primaryWeapon _newUnit)) then { _newUnit addWeapon _primweapon; };
		if (_secweapon != (secondaryWeapon _newUnit) && _secweapon != "") then { _newUnit addWeapon _secweapon; };
		if (_hasBackPack) then {
			_newUnit addBackpack _newBackpackType;
			_oldBackpack = dayz_myBackpack;
			dayz_myBackpack = unitBackpack _newUnit;
			_backpackWpnTypes = [];
			_backpackWpnQtys = [];
			if (count _backpackWpn > 0) then {
				_backpackWpnTypes = _backpackWpn select 0;
				_backpackWpnQtys = _backpackWpn select 1;
			};
			_countr = 0;
			{
				dayz_myBackpack addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];
				_countr = _countr + 1;
			} forEach _backpackWpnTypes;
			_backpackmagTypes = [];
			_backpackmagQtys = [];
			if (count _backpackmag > 0) then {
				_backpackmagTypes 	= _backpackMag select 0;
				_backpackmagQtys 	= _backpackMag select 1;
			};
			_countr = 0;
			{
				dayz_myBackpack addmagazineCargoGlobal [_x,(_backpackmagQtys select _countr)];
				_countr = _countr + 1;
			} forEach _backpackmagTypes;
		};
		removeAllWeapons _oldUnit;
		{
			_oldUnit removeMagazine _x;
		} forEach magazines _oldUnit;
		deleteVehicle _oldUnit;
		_oldUnit = nil;
		_newUnit setDamage 1;
		_newUnit setVariable["bodyName",_name,true];
		_newUnit setVariable["deathType",_method,true];
		_newUnit setVariable["cashMoney",_money,true];
	} else {cutText ["You need a free slot to take clothing.", "PLAIN DOWN"];};
}; 

 

 

 

 

В fn_selfActions  изменить свое на , 

 

//Remove CLOTHES
if (_isMan and !_isAlive and !_isZombie and !_isAnimal) then {
if (s_clothes < 0) then {
        s_clothes = player addAction [("<t color=""#0000FF"">"+("Take Clothes") + "</t>"), "ТВОЙ ПУТЬ\removeclothes.sqf",cursorTarget, 1, false, true, "",""];
    };
} else {
    player removeAction s_clothes;
    s_clothes = -1;
}; 

Но лучше найди 

// logic vars
	 

И сразу выше вставить 

Так а какая разница, судя по ошибке, скрипт не может подобрать класс пакета с одеждой, значит его не существует. И это значит, что он в любом случае не подберет, потому что ему нечего подбирать.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Создайте аккаунт или войдите в него для комментирования

Вы должны быть пользователем, чтобы оставить комментарий

Создать аккаунт

Зарегистрируйтесь для получения аккаунта. Это просто!

Зарегистрировать аккаунт

Войти

Уже зарегистрированы? Войдите здесь.

Войти сейчас

  • Похожие публикации

    • Автор: BR0wi
      Подскажите где найти людей, которые делаю моды на заказ. К кому вообще обращаться? Или что бы реализовать свои идеи нужно самому "год" сидеть и изучать все механики модинга?
    • Автор: CubeIn
      Приветствую господа, хочу создать новый проект, уникальный, но для этого нужен маппер.
      Я оставлю здесь свой дискрод, напишите в лс, кто готов взяться за крупный проект.
      4me#4542
    • Автор: 6agu
      Поставил
      Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.
    • Автор: 123new
      Много вопросов на данную тему наблюдаю от новичков, попробую прояснить немного сей вопрос.
       
      Предположим. что вы уже знаете на каких координатах вам надо спавнить определенное здание или объект\животное\бота, с каким углом поворота. И так. эта тема для вас.
       
      Сразу делаю пометку, метод, который добавили нам разработчики игры в патче 1.15, очень хорошо описал наш товарищ в сообщении форума:
      Рекоммендую вам использовать именно его!
      Ниже опубликованы старые методы.
       
      Если вы с расставили их с модифицированной версии Offline (Offline by Arksenor это называется), то вы получили и нашли код вида:
      GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13251.875000 0.0 3748.525879").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13254.599609 0.0 3722.703613").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13257.344727 0.0 3696.718750").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13260.040039 0.0 3670.984131").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13262.756836 0.0 3645.180176").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13265.441406 0.0 3619.531982").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13268.124023 0.0 3593.995361").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13270.844727 0.0 3568.186523").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13273.514648 0.0 3542.561279").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13276.195313 0.0 3517.048828").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13278.399414 0.0 3496.097900").SetOrientation("-96.000000 0.000000 0.000000"); Здесь (по примеру первой строки) 1 значение в скобках - id постройки/объекта, 2 значение - координаты в формате X Y Z, разделенные пробелом, 3 - значение поворота примерно в том же формате.
      Как это делать в Offline - статья от автора Offine:
      https://github.com/Arkensor/DayZCommunityOfflineMode/wiki/Add-custom-objects-to-your-server-or-mission
       
      И так, инструкция:
      1. Добавляем в начало init.c файла в вашей mpmissions следующий код:
      #include "$CurrentDir:mpmissions\dayzOffline.chernarusplus\spawn_buildings.c" 2. Создаем в папке вашей активной mpmissions файлик spawn_buildings.c и заполняем его следующей информацией.
      void SpawnObject( string type, vector position, vector orientation ) { private string NameBlockLog = "[CreateObject] "; private string InfoLog = ""; if(type != "") { auto obj = GetGame().CreateObject( type, "0 0 0" ); if(obj) { if ((position[0] != 0) && (position[1] != 0) && (position[2] != 0)) { obj.SetPosition( position ); obj.SetOrientation( orientation ); obj.Update(); if (obj.CanAffectPathgraph()) { obj.SetAffectPathgraph(true, false); GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, obj); } InfoLog = "[Type: '" + obj.GetType() + "' Position: '" + obj.GetPosition().ToString() + "' Orientation: '" + obj.GetOrientation().ToString() + "']"; Write_Log(NameBlockLog + " Object has been created successfully! Info " + InfoLog); } else { InfoLog = "[Type: '" + type + "' Position: '" + position + "' Orientation: '" + orientation + "']"; Write_Log(NameBlockLog + " Object can't be created! Incorrect writed position. Info " + InfoLog); } } else { InfoLog = "[Type: '" + type + "' Position: '" + position + "' Orientation: '" + orientation + "']"; Write_Log(NameBlockLog + " Object can't be created! Info " + InfoLog); } } else { InfoLog = "[Type: '" + type + "' Position: '" + position + "' Orientation: '" + orientation + "']"; Write_Log(NameBlockLog + " Object can't be created! Incorrect writed type. Info " + InfoLog); } } void Write_Log(string message) { Print(String(message)); } 3. Открываем созданный нами файл,  и в конце файла дописываем следующее:
      void SpawnAirfeeldBuildings() { SpawnObject( "Land_CementWorks_ExpeditionB", "13251.875000 0.0 3748.525879", "-96.000000 0.000000 0.000000"); SpawnObject( "Land_CementWorks_ExpeditionB", "13254.599609 0.0 3722.703613", "-96.000000 0.000000 0.000000"); SpawnObject( "Land_CementWorks_ExpeditionB", "13257.344727 0.0 3696.718750", "-96.000000 0.000000 0.000000"); } void SpawnKrasnoBuildings() { SpawnObject( "Land_CementWorks_ExpeditionB", "13251.875000 0.0 3748.525879", "-96.000000 0.000000 0.000000"); SpawnObject( "Land_CementWorks_ExpeditionB", "13254.599609 0.0 3722.703613", "-96.000000 0.000000 0.000000"); SpawnObject( "Land_CementWorks_ExpeditionB", "13257.344727 0.0 3696.718750", "-96.000000 0.000000 0.000000"); } Где после void - название функции идет, а между открытыми скобками вызов спавна самих зданий на указанных координатах.
      На примере 1 строки:
      Land_CementWorks_ExpeditionB - id постройки (type)
      13251.875000 0.0 3748.525879 - координаты в формате X Y Z
      -96.000000 0.000000 0.000000 - значение поворота в формате X Y Z
      Внимание: id постройки и координаты в примере указаны не верные и требуют подключения дополнительной модификации для корректной работы!!! Координаты не соответствуют названию функции!!!
      4. открываем в MpMissions в папке с вашей активной миссией init.c и перед ЗАКРЫВАЮЩЕЙ скобкой '}' дописываем нужную нам функцию (это будет активация спавна на карте):
      SpawnAirfeeldBuildings(); 5. Готово, Запускайте сервер, и в scripts.log вы увидите процедуру спавна ваших зданий и увидите, спавнятся ли они на карте или нет.
      Можно написать конечно и более готовую, универсальную систему спавна на карте со считыванием конфигурации из файла, но я считаю это лишним.
       
      Как заполнить добавленные здания лутом на карте:
      вариант 1:
      https://github.com/Arkensor/DayZCommunityOfflineMode/wiki/Enable-loot-for-custom-placed-objects
      вариант 2: вручную заполнить xml-файл  mapgrouppos.xml в mpmssions данными о местоположении зданий, где rpy - значение поворота здания в формате Z Y X
       
      С помощью данной статьи вы можете разместить любой элемент игры(постройку, животное, зомби, бота), доступный к спавну через любую модификацию-админ. панель. Очень полезный мод в этом смысле BuilderItems, с его помощью можно творить поистину интересные локации!
    • Автор: Venom21
      Появилась такая проблема, нужно закрыть некоторые слоты под одежду, когда на определённый слот одет предмет…
      пример: возьмём экзоскелет от Фидова, там есть две версии которая одеваеться как на тело и ноги, и есть которая одеваться на разгрузку и пояс, так вот, нужно например чтобы при одетом экзаче на тело и ноги слоты под пояс и разгрузку блокировались, либо только под определенные предметы, если есть интерес то цену можем в личке обсудить…
      P.S. Разрешение от Фидова на переделку и переупаковку есть)
  • Наш выбор

×
×
  • Создать...

Важная информация

Используя этот сайт, вы автоматически обязуетесь соблюдать наши Правила и Политика конфиденциальности.
Чтобы сделать этот веб-сайт лучше, мы разместили cookies на вашем устройстве. Вы можете изменить свои настройки cookies, в противном случае мы будем считать, что вы согласны с этим.