Нужна помощь?
Создайте тему в соответствующем разделе
Не нужно писать всё в чат!Загляните на торговую площадку
Там вы можете купить
всё что касается игровых серверовНе хотите бан?
Пожалуйста, ознакомьтесь с нашими правилами
Не нарушайте порядок!Продаёте или покупаете?
Пользуйтесь услугами гаранта
Мы сделаем вашу сделку безопасной
-
Объявления
-
⚙️ Новые онлайн-инструменты для DayZ 07/26/26
-
- 0
-
Похожие публикации
-
Автор: BorizzK
Давайте все что касается камер обсуждать в этой теме.
Камеры бывают
freedebugcamera
dayzspectator
staticcamera
Взято из примера:
Cоздание свободной камеры игроку (player - обьект игрока типа PlayerBase)
GetGame().SelectSpectator(player.GetIdentity(), "freedebugcamera", player.GetPosition()); Уничтожение камеры c возвратом фокуса камеры обратно к персонажу
PlayerBase pBody = player; GetGame().SelectPlayer(player.GetIdentity(), pBody);
Тут мне не ясен нюанс
Зачем было загонять обьект игрока в переменную pBody и использовать эту переменную в SelectPlayer, когда проще
GetGame().SelectPlayer(player.GetIdentity(), player);
И еще хотелось бы понять
как получить координаты положения камеры на сервере когда она создана и переместилась
-
Автор: Tamirlan
Народ помогите! У меня проблема! В один момент все персонажи (игроки), когда залетают на остров одеты не в свою одежду и у всех в рюкзаках пустые пластиковые бутылки! не знаю вообще как это исправить! SOS! Есть подозрение что что то произошло с базой данных! но не уверен! Может кто сталкивался с такой проблемой? Как решали... не будьте равнодушными пожалуйста помогите... (началось с того что один из игроков покупал пластиковые бутылки и не заметил что купил слишком много что у него они стали вываливаться и появляться на земле (в рюкзаке место закончилось)) в момент покупки бутылок говорит что что то на секунду подвисло и после этого все кто залетает в игру стали появляться в его одежде и с бутылками. Это было вчера. Сегодня кто то купил одежду сантаклауса и теперь все появляются в одежде санты. Причем если корректно выйти из миссии и после зайти на последнюю точку подключения все ок. А если выбрать любой город то все как я описывал выше. Плиз помогите решить этот полтергейст!)
-
Автор: dima3659
Доброе время суток.Подскажите как можно аккуратно и правильно убрать с карты все трейд зоны и торговцев
-
Автор: kommymist173
Недавно столкнулся с проблемой добавления техники в продажу...
Думал где же взять id техники...Долго мучался искал, и вот, нашел)
Держите не мучайтесь)
https://community.bistudio.com/wiki/Arma_3_CfgPatches_CfgVehicles
-
Автор: GhostDZ
Всем хорошим людям добрый день.
Предисловие:
Очень давно я удалил этот гайд с этого сайта. ВОт решил восстановить.
Скрипты P4L, SnapPro и BuiltVectors обновились, теперь собрать их вместе сложнее чем раньше но все еще возможно.
Это более старая но проверенная временем версия которая содержит солянку из Plot4Life, SnapPro, BuiltVectors и Admin Build.
1. Качаем архив прикрепленный к теме.
2. Папку custom забрасываем в корень миссии
3. Открываем файл init.sqf и после:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions
вставьте:
call compile preprocessFileLineNumbers "custom\compiles1.sqf"; ну или если вы прошаренный пользователь, можете перенести все значения из моего файла в свой кастомный compiles.
Прошу обратить внимание на тот момент что если у вас в миссии уже есть такие файлы то их нужно совместить, тут вам поможет плагин compare для Notepad++.
4. Все в том же init.sqf ниже:
DZE_BuildOnRoads Вставьте:
DZE_noRotate = []; //То что нельзя вращать. Ex: DZE_noRotate = ["VaultStorageLocked"] DZE_curPitch = 45; //Стартовый угол наклона. Доступны только эти цифры1, 5, 45, 90. WG_adminBuild = ["","","",""]; //Админские SteamID 5. Идем в server_functions.sqf и находим там:
dayz_objectUID2 = { тут весь код функции }; заменяем всю функцию на:
dayz_objectUID2 = { private["_position","_dir","_key"]; if((count _this) == 2) then{ _dir = _this select 0; _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } count _position; _key = _key + str(round(_dir)); }else{ if((count _this) == 3) then{ if(typename (_this select 2) == "ARRAY")then{ _vector = _this select 2; if(count _vector == 2)then{ if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{ _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } count _position; _vecCnt = 0; { _set = _x; { _vecCnt = _vecCnt + (round (_x * 100)) } foreach _set; } foreach _vector; if(_vecCnt < 0)then{ _vecCnt = ((_vecCnt * -1) * 3); }; _key = _key + str(_vecCnt); }else{ _dir = _this select 0; _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } count _position; _key = _key + str(round(_dir)); }; }else{ _dir = _this select 0; _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } count _position; _key = _key + str(round(_dir)); }; }else{ _dir = _this select 0; _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } count _position; _key = _key + str(round(_dir)); }; }else{ if((count _this) == 4) then{ if(typename (_this select 3) == "ARRAY")then{ _vector = _this select 3; if(count _vector == 2)then{ if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{ _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } count _position; _vecCnt = 0; { _set = _x; { _vecCnt = _vecCnt + (round (_x * 100)) } foreach _set; } foreach _vector; if(_vecCnt < 0)then{ _vecCnt = ((_vecCnt * -1) * 3); }; _key = _key + str(_vecCnt); }else{ _dir = _this select 0; _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } count _position; _key = _key + str(round(_dir)); }; }else{ _dir = _this select 0; _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } count _position; _key = _key + str(round(_dir)); }; }else{ if(typename (_this select 2) == "ARRAY")then{ _vector = _this select 2; if(count _vector == 2)then{ if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{ _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } count _position; _vecCnt = 0; { _set = _x; { _vecCnt = _vecCnt + (round (_x * 100)) } foreach _set; } foreach _vector; if(_vecCnt < 0)then{ _vecCnt = ((_vecCnt * -1) * 3); }; _key = _key + str(_vecCnt); }else{ _dir = _this select 0; _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } count _position; _key = _key + str(round(_dir)); }; }else{ _dir = _this select 0; _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } count _position; _key = _key + str(round(_dir)); }; }else{ _dir = _this select 0; _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } count _position; _key = _key + str(round(_dir)); }; }; }else{ _dir = _this select 0; _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } count _position; _key = _key + str(round(_dir)); }; }; }; _key }; 6. Идем в server_monitor.sqf и находим там:
// # NOW SPAWN OBJECTS # тут много кода // # END SPAWN OBJECTS # все что между этими строками заменяем на:
// # NOW SPAWN OBJECTS # _totalvehicles = 0; { _idKey = _x select 1; _type = _x select 2; _ownerID = _x select 3; _worldspace = _x select 4; _intentory = _x select 5; _hitPoints = _x select 6; _fuel = _x select 7; _damage = _x select 8; _dir = 0; _pos = [0,0,0]; _wsDone = false; if (count _worldspace >= 2) then { if ((typeName (_worldspace select 0)) == "STRING") then { _worldspace set [0, call compile (_worldspace select 0)]; _worldspace set [1, call compile (_worldspace select 1)]; }; _dir = _worldspace select 0; if (count (_worldspace select 1) == 3) then { _pos = _worldspace select 1; _wsDone = true; } }; if (!_wsDone) then { if (count _worldspace >= 1) then { _dir = _worldspace select 0; }; _pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos; if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; }; diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos)); }; _vector = [[0,0,0],[0,0,0]]; _vecExists = false; _ownerPUID = "0"; if (count _worldspace >= 3) then{ if(count _worldspace == 3) then{ if(typename (_worldspace select 2) == "STRING")then{ _ownerPUID = _worldspace select 2; }else{ if(typename (_worldspace select 2) == "ARRAY")then{ _vector = _worldspace select 2; if(count _vector == 2)then{ if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{ _vecExists = true; }; }; }; }; }else{ //Was not 3 elements, so check if 4 or more if(count _worldspace == 4) then{ if(typename (_worldspace select 3) == "STRING")then{ _ownerPUID = _worldspace select 3; }else{ if(typename (_worldspace select 2) == "STRING")then{ _ownerPUID = _worldspace select 2; }; }; if(typename (_worldspace select 2) == "ARRAY")then{ _vector = _worldspace select 2; if(count _vector == 2)then{ if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{ _vecExists = true; }; }; }else{ if(typename (_worldspace select 3) == "ARRAY")then{ _vector = _worldspace select 3; if(count _vector == 2)then{ if(((count (_vector select 0)) == 3) && ((count (_vector select 1)) == 3))then{ _vecExists = true; }; }; }; }; }else{ //More than 3 or 4 elements found //Might add a search for the vector, ownerPUID will equal 0 }; }; }; // diag_log format["Server_monitor: [ObjectID = %1] [ClassID = %2] [_ownerPUID = %3]", _idKey, _type, _ownerPUID]; if (_damage < 1) then { //diag_log format["OBJ: %1 - %2", _idKey,_type]; //Create it _object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"]; _object setVariable ["lastUpdate",time]; _object setVariable ["ObjectID", _idKey, true]; _object setVariable ["OwnerPUID", _ownerPUID, true]; _lockable = 0; if(isNumber (configFile >> "CfgVehicles" >> _type >> "lockable")) then { _lockable = getNumber(configFile >> "CfgVehicles" >> _type >> "lockable"); }; // fix for leading zero issues on safe codes after restart if (_lockable == 4) then { _codeCount = (count (toArray _ownerID)); if(_codeCount == 3) then { _ownerID = format["0%1", _ownerID]; }; if(_codeCount == 2) then { _ownerID = format["00%1", _ownerID]; }; if(_codeCount == 1) then { _ownerID = format["000%1", _ownerID]; }; }; if (_lockable == 3) then { _codeCount = (count (toArray _ownerID)); if(_codeCount == 2) then { _ownerID = format["0%1", _ownerID]; }; if(_codeCount == 1) then { _ownerID = format["00%1", _ownerID]; }; }; _object setVariable ["CharacterID", _ownerID, true]; clearWeaponCargoGlobal _object; clearMagazineCargoGlobal _object; // _object setVehicleAmmo DZE_vehicleAmmo; _object setdir _dir; if(_vecExists)then{ _object setVectorDirAndUp _vector; }; _object setposATL _pos; _object setDamage _damage; if ((typeOf _object) in dayz_allowedObjects) then { if (DZE_GodModeBase) then { _object addEventHandler ["HandleDamage", {false}]; } else { _object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}]; }; // Test disabling simulation server side on buildables only. _object enableSimulation false; // used for inplace upgrades && lock/unlock of safe _object setVariable ["OEMPos", _pos, true]; }; if (count _intentory > 0) then { /*ZSC if( count (_intentory) > 3)then{ _object setVariable ["bankMoney", _intentory select 3, true]; }else{ _object setVariable ["bankMoney", 0, true]; }; ZSC*/ if (_type in DZE_LockedStorage) then { // Fill variables with loot _object setVariable ["WeaponCargo", (_intentory select 0),true]; _object setVariable ["MagazineCargo", (_intentory select 1),true]; _object setVariable ["BackpackCargo", (_intentory select 2),true]; } else { //Add weapons _objWpnTypes = (_intentory select 0) select 0; _objWpnQty = (_intentory select 0) select 1; _countr = 0; { if(_x in (DZE_REPLACE_WEAPONS select 0)) then { _x = (DZE_REPLACE_WEAPONS select 1) select ((DZE_REPLACE_WEAPONS select 0) find _x); }; _isOK = isClass(configFile >> "CfgWeapons" >> _x); if (_isOK) then { _object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)]; }; _countr = _countr + 1; } count _objWpnTypes; //Add Magazines _objWpnTypes = (_intentory select 1) select 0; _objWpnQty = (_intentory select 1) select 1; _countr = 0; { if (_x == "BoltSteel") then { _x = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow if (_x == "ItemTent") then { _x = "ItemTentOld" }; _isOK = isClass(configFile >> "CfgMagazines" >> _x); if (_isOK) then { _object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)]; }; _countr = _countr + 1; } count _objWpnTypes; //Add Backpacks _objWpnTypes = (_intentory select 2) select 0; _objWpnQty = (_intentory select 2) select 1; _countr = 0; { _isOK = isClass(configFile >> "CfgVehicles" >> _x); if (_isOK) then { _object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)]; }; _countr = _countr + 1; } count _objWpnTypes; }; }; if (_object isKindOf "AllVehicles") then { { _selection = _x select 0; _dam = _x select 1; if (_selection in dayZ_explosiveParts && _dam > 0.8) then {_dam = 0.8}; [_object,_selection,_dam] call object_setFixServer; } count _hitpoints; _object setFuel _fuel; if (!((typeOf _object) in dayz_allowedObjects)) then { //_object setvelocity [0,0,1]; _object call fnc_veh_ResetEH; if(_ownerID != "0" && !(_object isKindOf "Bicycle")) then { _object setvehiclelock "locked"; }; _totalvehicles = _totalvehicles + 1; // total each vehicle serverVehicleCounter set [count serverVehicleCounter,_type]; }; }; //Monitor the object PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object]; }; } count (_BuildingQueue + _objectQueue); // # END SPAWN OBJECTS # 7. Идем в description.ext и в самый низ:
#include "custom\snap_pro\snappoints.hpp"
Все установка и настройка закончены, можно ставить ЭТО
BuildVectorsAdminP4lV3.zip
-
-
Наш выбор

Добрый день/вечер/утро/ночь.
Пытаюсь подключить миссию Конвой ( http://s-platoon.ru/index.php?/topic/2998-convoy-avtomobilnyi-konvoi-dlia-chernorusi/ ), но на карту Napf.
Я так понимаю ни чем отличным от Черноруси не будет отличатся, кроме как координатами спавна и маршрутов.... Координаты поменял. И все работает, но... Но в файле arma2oaserver.RPT появляются ошибки, которые распирают сам файл.
Здесь много всего... Но особое внимание на:
И вроде бы синтаксических ошибок нет. Да и я в этой части кода ни чего не менял... А ошибки начали сыпаться....
Корректированный код конвоя:
//========================== //CASCA CONVOY FOR CHERNARUS //========================== //==================== //BASIC KONFIGURATION! //==================== _cascasToSpawn = 8; //Number of convoys to Spawn: default is 8 _timeBetweenSpawns = 500; //Time between each consecutive spawn _convoyFormation = [1,1,1,2,2,2,3,3]; //number of cars in each convoy. Must have _cascasToSpawn numbers. _turretMansSkill = 0.45; //Skill ot the turret operators, from 0 to 1 _cargoMansSkill = 0.7; //Skill of the cargo ocupants, from 0 to 1 _showWpsOnMap = false; //Show waypoints on the map? _showSpMrk = false; //Show spawn marker& //KONFIGURATION! END //==================== //EXTRA KONFIGURATION! //==================== //Vehicle Spawns //[[vehicle spawn position],[waypoints to go first (one is choosen)*],spawn angle,spawn radius] // * use _showWpsOnMap = true to see the way points _origins = [ [[2851.18,6319.6,0],[53],100,20], [[12340.8,15603.3,0],[123],30,15], [[9160.92,17668.5,0],[61],0,20] ]; //Simple loot, for car 1 of convoys with 1 car and for car 1 and 2 with convoys with 2 or 3 cars //[command to add loot,the item to add as loot,[quantity of the item when in a convoy with 1 vehicle,2 vehicles,3 vehicles]] _loot1 = [ ["addWeaponCargoGlobal","NVGoggles",[3,4,5]], ["addWeaponCargoGlobal","ItemEtool",[3,4,5]], ["addWeaponCargoGlobal","Binocular_Vector",[2,3,4]], ["addMagazineCargoGlobal","ItemBloodBag",[8,12,16]], ["addMagazineCargoGlobal","PartEngine",[5,7,9]], ["addMagazineCargoGlobal","ItemBandage",[20,25,30]], ["addMagazineCargoGlobal","HandGrenade_West",[6,10,14]], ["addMagazineCargoGlobal","ItemBriefcase100oz",[1,1,2]], ["addMagazineCargoGlobal","ItemBriefcase100oz",[1,1,1]] ]; //High loot, for car 3 of convoys with 3 cars //[command to add loot,the item to add as loot,[quantity of the item when in a convoy with 1 vehicle,2 vehicles,3 vehicles]] _loot2 = [ ["addMagazineCargoGlobal","ItemBriefcase100oz",[1,2,3]], ["addMagazineCargoGlobal","ItemBriefcase100oz",[1,1,2]], ["addMagazineCargoGlobal","ItemBriefcase100oz",[1,1,2]] ]; //======================= //SHOW SPAWN ICONS ON MAP //======================= if (_showSpMrk) then { [] spawn { donn_casca_icons = [ [[2851.18,6319.6],"Casca Cars Spawn 1","Dot","ColorPink"], [[12340.8,15603.3],"Casca Cars Spawn 2","Dot","ColorPink"], [[9160.92,17668.5],"Casca Cars Spawn 3","Dot","ColorPink"] ]; while {true} do { { private ["_don_marker_put","_mtype","_mcolor"]; _don_marker_put = createMarker [_x select 1, _x select 0]; _don_marker_put setMarkerShape "Icon"; _don_marker_put setMarkerText (_x select 1); _don_marker_put setMarkerType (_x select 2); _don_marker_put setMarkerColor (_x select 3); } forEach donn_casca_icons; sleep 10; { deleteMarker (_x select 1); } forEach donn_casca_icons; }; }; }; //================ //THE CASCA SCRIPT //================ //Avoid Vehicles to Explode when Entering it [] spawn { waitUntil {!isNil "DZE_safeVehicle"}; sleep 5; _cascaVehicles = ["Lada2","UAZ_CDF","HMMWV_M1035_DES_EP1","Offroad_DSHKM_Gue","UAZ_MG_CDF","WMMWV_M998A2_SOV_DES_EP1"]; DZE_safeVehicle = DZE_safeVehicle + _cascaVehicles; }; //Waypoints donn_wps = [ [3823.51,14323.9,0], [4765.57,12717.2,0], [5021.18,11373.7,0], [3163.65,12148.6,0], [1982.07,9750.16,0], [2851.18,6319.6,0], [5249.55,4474,0], [8425.14,914.564,0], [11017.2,2011.66,0], [14441.2,2894.12,0], [18074.4,2585.29,0], [15447.2,5786.65,0], [13160.6,6434.4,0], [18624.4,9493.6,0], [15936.4,10380.1,0], [15771.8,13280.8,0], [17331.9,13881.2,0], [14303,16965.1,0], [14705.3,14447.2,0], [12523.3,13582.4,0], [12340.8,15603.3,0], [11468.5,16137.3,0], [10191.7,18314.8,0], [9160.92,17668.5,0], [8389.35,17232.4,0], [7623.72,11704.5,0], [10563.5,5057.22,0] ]; //Ways to go from each waypoint donn_wps_go = [ [137,138], [36,137,138], [18,38,17], [21,4,167], [3,39], [24,146,168], [168,19,22], [9,8], [30,7,32], [32,7,34], [11,29,168], [10,78,12], [15,135,11], [44,45,124], [25,15,126], [14,23,12], [41,17,42], [16,2,38], [2,22,19], [143,6,18], [21,143,38], [3,20,147], [6,18,23], [45,15,22], [147,5,143], [136,14,66], [145,146,27], [89,28,26], [27,29,84], [79,10,28], [54,8,31], [43,30,32], [8,31,9], [124,36], [139,9,37], [139,138,37], [1,139,33], [140,35,34], [140,142,35,2], [141,4,40], [41,167,39], [167,16,40], [141,142,16], [49,31,44], [43,13,125], [13,23,137], [47,125], [126,46,69], [49,55], [48,50,43], [49,54,51], [55,50,52], [53,51,58], [52,54], [50,30,53], [48,51,56], [57,60,55], [56,127,59], [59,52], [58,57,127], [166,127,56], [128,166,62], [61,63], [62,129,64], [128,65,63], [64,70,104], [25,67,74,135], [66,70,68], [69,67], [68,166,47], [67,71,65], [72,70,104], [71,73,103], [72,74,81,82], [75,66,73], [77,76,74,81], [135,75,77], [75,76,78], [79,77,11], [78,29,80], [84,81,79], [82,73,75], [83,73,81], [102,82,154], [80,28,85], [84,122,86], [150,85], [88,150,89], [87,90], [90,150,27], [88,89], [150,92], [151,152,91], [151,94,153], [95,121,157], [121,93,94], [157,161,133], [161,134,132], [99,115,164], [98,104,100], [99,105,101], [121,102,100], [103,101,83], [102,72,106], [66,99,106], [106,100], [104,103,105], [108,64,65], [109,107,115], [108,130,129], [111,163,130], [162,110,114], [113,110], [112,111,110], [111,165], [163,108,98], [117,133], [162,131], [153,152,150], [153,156,120], [155,121,119], [120,101,94], [156,154,85], [152,93], [33,13,32], [44,46,126], [125,47,14], [59,57,60], [61,64,70], [63,130,109], [109,129,110], [132,117,163], [133,131,97], [132,95,116], [97,164,100], [76,66,136], [135,25,12], [1,45,0], [0,35,1], [36,35,34], [37,38,141], [140,42,39], [42,141,38], [20,19,24], [147,145,148], [26,144,146], [5,26,149], [24,144,21], [149,147,146], [146,145,148], [86,91,89,87], [92,152,93], [92,118,123], [118,119,93], [83,155,122], [120,154,156], [122,155,119], [158,96,94], [159,157,160], [158,160], [158,159,161], [96,160,97], [111,117], [115,164,131], [98,163,134], [114,113], [60,61,69], [40,41,3], [5,6,10] ]; //Bot Weapons (from DZMS) donn_weapons = [ "FN_FAL", "FN_FAL_ANPVS4", "Mk_48_DZ", "M249_DZ", "BAF_L85A2_RIS_Holo", "G36C", "G36C_camo", "G36A_camo", "G36K_camo", "AK_47_M", "AKS_74_U", "M14_EP1", "bizon_silenced", "DMR_DZ", "RPK_74" ]; //Show waypoints on map _showWpsOnMap spawn { while {_this} do { { private ["_don_marker_put"]; _don_marker_put = createMarker ["Don_Cascars_" + (str _forEachIndex),_x]; //_don_marker_put setMarkerText ((str _forEachIndex) + " " + (str (donn_wps_go select _forEachIndex))); _don_marker_put setMarkerShape "Icon"; _don_marker_put setMarkerType "x_art"; _don_marker_put setMarkerColor "ColorPink"; } forEach donn_wps; sleep 25; { deleteMarker ("Don_Cascars_" + (str _forEachIndex)); } forEach donn_wps; }; }; //Casca units icons on map donn_units_motor = []; [] spawn { _donn_units_motor = []; _donn_units_motor_delete = []; _iconFirstRun = false; while {true} do { if (_iconFirstRun) then { { deleteMarker ("Donn_Motor_" + str _x); } forEach _donn_units_motor_delete; } else { _iconFirstRun = true; }; _donn_units_motor = donn_units_motor; _donn_units_motor_delete = []; _vehIcon = []; { _veh = vehicle _x; if ((_x != _veh && !(_veh in _vehIcon)) || _x == _veh) then { _mark = createMarker ["Donn_Motor_" + str _forEachIndex, getPosATL _x]; _mark setMarkerShape "Icon"; _mark setMarkerType "x_art"; _mark setMarkerText (str (_x getVariable ["donn_goto",-1])); if (vehicle _x != _x) then { _mark setMarkerColor "ColorBlue"; } else { _mark setMarkerColor "ColorYellow"; }; if (_x != _veh) then { _vehIcon = _vehIcon + [_veh]; }; _donn_units_motor_delete = _donn_units_motor_delete + [_forEachIndex]; }; } forEach _donn_units_motor; sleep 0.5; }; }; //Send casca positions to clients [] spawn { while {true} do { cad_pvar_spositions = []; { cad_pvar_spositions = cad_pvar_spositions + [getPosATL _x]; } forEach donn_units_motor; publicVariable"cad_pvar_spositions"; sleep 2; }; }; [] spawn { while {true} do { { if !(alive _x) then { donn_units_motor = donn_units_motor - [_x]; }; sleep 0.001; } forEach donn_units_motor; sleep 25; }; }; //Spawn Casca unit/convoy _spawnOrder = 1; for "_cs" from 1 to _cascasToSpawn do { diag_log ("[CASCA CONVOY] Initialized Spawn! " + str _spawnOrder); //Inicializacao _spawn = _origins select ((_cs + 2) mod (count _origins)); _origin = _spawn select 0; _rad = _spawn select 3; _cars = [ //[vehicle, cargo places, [gunner 1 ammo, gunner 2 ammo, ...], loot] ["Lada2",1,[],_loot1 call BIS_fnc_selectRandom], ["UAZ_CDF",2,[],_loot1 call BIS_fnc_selectRandom], ["HMMWV_M1035_DES_EP1",3,[],_loot2 call BIS_fnc_selectRandom] ]; _rosa_group = createGroup EAST; _qtd = _convoyFormation select (_cs-1); for "_x" from 1 to _qtd do { private ["_firstDriver"]; //Spawn Car _car = _cars select (_x - 1); _motor = createVehicle [_car select 0,_origin,[],_rad,"NONE"]; _motor setDir (_spawn select 2); _motor setVariable ["ObjectID", "1", true]; _motor setVariable ["ObjectUID", "1", true]; _motor addEventHandler ["GetIn",{ _motor = _this select 0; _player = _this select 2; if (_player in playableUnits) then { _player action ['getOut', _motor]; }; }]; //Refuel Vehicle _motor spawn { while {alive _this} do { _this setFuel 1; sleep 120; }; }; //Put Loot in the Car clearWeaponCargoGlobal _motor; clearMagazineCargoGlobal _motor; call compile format [ "_motor %1 ['%2',%3];", _car select 3 select 0, _car select 3 select 1, _car select 3 select 2 select (_qtd - 1) ]; //Put vehicle Ammo _ammos = _car select 2; { _ammo = _x; for "_a" from 1 to 10 do { _motor addMagazineTurret [_ammo,[_forEachIndex]]; }; } forEach _ammos; //Spawn Soldier _driverCount = 1; _turreterCount = count _ammos; _cargorsCount = _car select 1; _crewCount = _driverCount + _turreterCount + _cargorsCount; _gunnerPos = 0; _crew = []; for "_y" from 1 to _crewCount do { //Create Soldier //_skin = ["Functionary1_EP1_DZ","TK_INS_Bonesetter_EP1","TK_INS_Bonesetter_EP1","TK_INS_Bonesetter_EP1","TK_INS_Bonesetter_EP1"]; _unit = _rosa_group createUnit ["Functionary1_EP1_DZ",[50,50,50],[],50,"PRIVATE"]; [_unit] joinSilent _rosa_group; _unit setCombatMode "RED"; _unit setBehaviour "SAFE"; donn_units_motor = donn_units_motor + [_unit]; _unit addEventHandler ["Killed",{ _unit = _this select 0; _weapon = (weapons _unit) select 0; removeAllWeapons _unit; removeAllItems _unit; if (random 100 > 50) then { _unit addWeapon _weapon; _unit selectWeapon _weapon; }; donn_units_motor = donn_units_motor - [_unit]; if ({alive _x} count (units group _unit) == 0) then { deleteGroup group _unit; }; }]; _unit setVariable ["donn_goto",_cs,false]; _crew = _crew + [_unit]; //Give soldier weapon and ammo removeAllWeapons _unit; removeAllItems _unit; _weapon = donn_weapons call BIS_fnc_selectRandom; _magazines = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines"); _magazine = _magazines call BIS_fnc_selectRandom; _unit addWeapon _weapon; _unit selectWeapon _weapon; for "_pa" from 1 to 8 do { _unit addMagazine _magazine; }; //Put AI in the car if (_y == 1) then { //Driver _unit moveInDriver _motor; _unit setSkill 1; _firstDriver = _unit; }; if (_y > 1 && _y <= 1 + _turreterCount) then { //Turreters _unit assignAsGunner _motor; _unit moveInTurret [_motor,[_gunnerPos]]; _unit setSkill _turretMansSkill; _gunnerPos = _gunnerPos + 1; }; if (_y > 1 + _turreterCount) then { //Cargors _unit assignAsCargo _motor; _unit moveInCargo _motor; _unit setSkill _cargoMansSkill; }; [_unit,_motor] spawn { //waitUntil {sleep 30;false}; //OFF _unit = _this select 0; _motor = _this select 1; while {alive _unit} do { _KA_players = false; { if (_unit knowsAbout _x >= 1 && _unit distance _x < 300) exitWith { _KA_players = true; }; } forEach playableUnits; _unitInCar = vehicle _unit != _unit; if (_KA_players && _unitInCar) then { [_unit] orderGetIn false; waitUntil {sleep 0.001;vehicle _unit == _unit}; }; if (!_KA_players && !_unitInCar) then { [_unit] orderGetIn true; waitUntil {sleep 0.001;vehicle _unit != _unit}; }; sleep 7.5; }; }; }; //Garantee Vehicle Driver [_crew,_motor,_firstDriver] spawn { private ["_newDriver"]; _crew = _this select 0; _motor = _this select 1; _firstDriver = _this select 2; waitUntil {sleep 5;!(alive _firstDriver)}; while {{alive _x} count _crew > 0} do { { if (alive _x) exitWith {_newDriver = _x}; } forEach _crew; _newDriver assignAsDriver _motor; if (vehicle _newDriver == _motor && driver _motor != _newDriver) then { [_unit] orderGetIn false; sleep 4; [_unit] orderGetIn true; }; waitUntil {sleep 5;!(alive _newDriver)}; }; }; }; //Make the route [_rosa_group,_spawn,_qtd] spawn { private ["_alive"]; _rosa_group = _this select 0; _spawn = _this select 1; _qtd = _this select 2; _nextWayIndex = (_spawn select 1) call BIS_fnc_selectRandom; _nextWay = donn_wps select _nextWayIndex; _initialWp = _nextWay; _lastWayIndex = [-1,-1,-1,-1]; _wp = _rosa_group addWaypoint [_nextWay,15,0]; _wp setWaypointType "MOVE"; _wp setWaypointSpeed "FULL"; for "_c" from 1 to 29 do { _lastWayIndex set [0,"delete"]; _lastWayIndex = _lastWayIndex - ["delete"]; _lastWayIndex set [count _lastWayIndex,_nextWayIndex]; _wpOptions = donn_wps_go select _nextWayIndex; _temp = _wpOptions; while {true} do { _nextWayIndex = _temp call BIS_fnc_selectRandom; if !(_nextWayIndex in _lastWayIndex) exitWith {}; _temp = _temp - [_nextWayIndex]; if (count _temp == 0) then { _lastWayIndex = [-1,-1,-1,_lastWayIndex select 3]; _temp = _wpOptions; }; sleep 0.001 }; _nextWay = donn_wps select _nextWayIndex; _wp = _rosa_group addWaypoint [_nextWay,15,_c]; _wp setWaypointType "MOVE"; _wp setWaypointSpeed "FULL"; }; _wp = _rosa_group addWaypoint [_initialWp,15,30]; _wp setWaypointType "CYCLE"; _wp setWaypointSpeed "FULL"; }; sleep _timeBetweenSpawns; _spawnOrder = _spawnOrder + 1; };В чем (или чем вызвана) может быть эта ошибка?!
Изменено пользователем Tiberian (история изменений)И кстати. Что обозначает переменная donn_wps_go ? И это точно не координаты... тогда что?
И еще заметил следующее:
Когда создается конвой, создается два одинаковых и в одних и тех же координатах.... Один движется по маршруту как положено, а второй стоит на месте....
Поделиться сообщением
Ссылка на сообщение
Поделиться на других сайтах