Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
Ramhha

Deploy with 1.8.7

Скачал миссию Dystopia и обнаружил там интересные скрипты с развёртыванием велосипедов, мотоциклов и прочего через тулбокс. Решил добавить себе. Обыскал всю миссию и понял что скрипт подключается вот где:

 

1) Само собой extrarc.hpp

2) variables

3) fn_selfactions

 

Процесс установки такой

 

Добавил в Variables строчку 

 

s_player_packOBJ = -1;
 

в секцию

 

dayz_resetSelfActions = {
 

Ещё в 

 

DayZ_SafeObjects
 

Развёртываемую технику

 

В fn_selfactions добавил этот код

 

_isDeployed = cursorTarget getVariable ["Deployed",false];
	if (isNil "_isDeployed") then {_isDeployed = false;};
    if ((_isDeployed) && (speed player <= 1) && ((player distance cursorTarget) < 5)) then {
                _dObj = cursorTarget;
                if (s_player_packOBJ < 0) then {
                        s_player_packOBJ = player addaction [("<t color=""#ff5200"">" + ("Pack "+typeOf _dObj+"") +"</t>"),"Scripts\deploy\pack.sqf",_dObj,6,false,true,"", ""]
                };
    } else {
                player removeAction s_player_packOBJ;
                s_player_packOBJ = -1;
    };

Про extrarc расписывать не буду, там и так всё ясно.

 

Больше никаких строчек кода связанных с этими скриптами в миссии дистопии я не нашёл(ну или плохо искал)

 

Ну вроде всё сделал верно, но проблема в том что развёртываемая техника не спавнится. 

Вот сами оригинальные скрипты:

 

deploy_bike.sqf:

 

_maxBikes = 2;
if (isNil "bicycles_DELOYED") then {bicycles_DELOYED = 0;};
/*if (dayz_combat == 1) exitWith {
    _txt = "You can't deploy vehicles while in combat.";
    cutText [_txt, "PLAIN DOWN"];
    systemChat (_txt);
};*/
    
if (bicycles_DELOYED > _maxBikes -1) then {
    _txt = format ["You have built %1 out of a maximum of %2 bicycles.",bicycles_DELOYED,_maxBikes];
    systemChat (_txt);
    cutText [_txt,"PLAIN DOWN"];
}else{


if ("ItemToolbox" in weapons player) then {
    r_interrupt = false;
    player playActionNow "Medic";
    player removeWeapon "ItemToolbox";
    
    [player,"repair",0,false,10] call dayz_zombieSpeak;
    [player,10,true,(getPosATL player)] spawn player_alertZombies;
    sleep 6;
    
    _object = "Old_bike_TK_INS_EP1";
    _dir = getdir (vehicle player);
    _pos = getPos (vehicle player);
    _pos = [(_pos select 0)+4*sin(_dir),(_pos select 1)+4*cos(_dir),0];
    PVDZ_OBJ_DEPLOY = [_pos,player,_object];
    publicVariableServer "PVDZ_OBJ_DEPLOY";
    
    if (isNil "bicycles_DELOYED") then {bicycles_DELOYED = 1;} else {bicycles_DELOYED = bicycles_DELOYED + 1;};
    if (floor(random 10) < 2) then {
        r_player_infected = true;
        player setVariable["USEC_infected",true,true];
        [0.6,1] call fnc_usec_pitchWhine;
        addCamShake [55, 0.6, 111];
        cutText ["You used your Toolbox to build a bicycle! It looks like you cut yourself in the process.. You feel the infection setting in..","PLAIN DOWN"];
    } else {cutText ["You used your Toolbox to build a bicycle!", "PLAIN DOWN"];};
    _txt = format ["You have built a bicycle! You have built %1 out of a maximum of %2 bicycles.",bicycles_DELOYED,_maxBikes];
    systemChat (_txt);
    
    r_interrupt = false;
    player switchMove "";
    player playActionNow "stop";
    sleep 10;

    systemChat ("WARNING: "+name player+"! Deployed bikes do not save after server restart");
    systemChat ("WARNING: "+name player+"! Deployed bikes might get deleted when not in use");
} else {
    _txt = "You need: 1x(Toolbox) to build this.";
    cutText [_txt, "PLAIN DOWN"];
    systemChat (_txt);
};
};
 

 

pack.sqf:

 

_nearby = {isPlayer _x} count (nearestObjects [player, ["CAManBase"], 5]);
_count = (_nearby - 1);
if (_count > 0) exitWith {
    _txt = "You can't pack vehicles when a player is within 5m of you!";
    cutText [_txt,"PLAIN DOWN"];
    systemChat ("Dystopia: "+str _txt+"");
};
/*if (dayz_combat == 1) exitWith {
    _txt = "You can't pack vehicles while in combat.";
    cutText [_txt, "PLAIN DOWN"];
    systemChat (_txt);
};*/
_obj = _this select 3;
if (((damage _obj) > 0.8) || !(canMove _obj)) exitWith {
    cutText ["This "+typeOf _obj+" is too damaged to pack.","PLAIN DOWN"];
    systemChat ("This "+typeOf _obj+" is too damaged to pack.");
};
_objPos = getPosATL _obj;
player removeAction s_player_packOBJ;
r_interrupt = false;
player playActionNow "Medic";
sleep 1;

_sfx = "repair";
[player,_sfx,0,false,5] call dayz_zombieSpeak;
sleep 1;

deleteVehicle _obj;

if (typeOf _obj == "Old_bike_TK_INS_EP1" || typeOf _obj == "MH6J_DZ" || typeOf _obj == "suv_dz" || typeOf _obj == "Old_moto_TK_Civ_EP1" || typeOf _obj == "PBX") then {
    _origMat = ["ItemToolbox"];
    {
        _bag = createVehicle ["WeaponHolder_"+_x+"",_objPos,[], 1, "CAN_COLLIDE"];
        _bag modelToWorld getPosATL player;
        _bag setdir (getDir player);
        player reveal _bag;
    } forEach _origMat;
};

if (floor (random 10) < 4) then {
    r_player_infected = true;
    player setVariable["USEC_infected",true,true];
    [0.6,1] call fnc_usec_pitchWhine;
    addCamShake [55, 0.6, 111];
    cutText ["You cut yourself while packing your "+typeOf _obj+".. You feel the infection setting in..","PLAIN DOWN"];
} else {
    cutText ["You have packed your "+typeOf _obj+".","PLAIN DOWN"];
};
systemChat ("You have packed the "+typeOf _obj+" for: "+str _origMat+"");
systemChat ("Look on the ground for your materials!");
sleep 5;

 

В этих строках указаны позиция для спавна развёртываемой техники. Да вот только не спавнит. Как изменить или подправить?

_object = "Old_bike_TK_INS_EP1";
    _dir = getdir (vehicle player);
    _pos = getPos (vehicle player);
    _pos = [(_pos select 0)+4*sin(_dir),(_pos select 1)+4*cos(_dir),0];
    PVDZ_OBJ_DEPLOY = [_pos,player,_object];
    publicVariableServer "PVDZ_OBJ_DEPLOY";
 

 

Все скрипты из папки deploy - 

 

http://rgho.st/6qYCCt9FW
 

 

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts




  • 0

а что такого "космического" в этом скрипте?

Share this post


Link to post
Share on other sites
  • 0

а что такого "космического" в этом скрипте?

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

Share this post


Link to post
Share on other sites
  • 0

заразиться при 2 секундной сборке лясика- оч смешно )

Share this post


Link to post
Share on other sites
  • 0

заразиться при 2 секундной сборке лясика- оч смешно )

когда это не лясик, а верт или сув то почему бы и нет)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By Adrian29rus
      Всем доброго времени суток.
      Может плохо искал, но решения так увы и не нашел.
       
      Стоит DayzCC 7.8.0.0
      Сам Dayz без каких либо модов, правок и нет Рмода.
      Ставил ботов по гайду Таурена на ютюбе и тут сверялся с форумом.
      Толку нет. Гайды устарели.
       
      Редактирую файл по пути: Arma 2 Operation Arrowhead\@Dayzcc_wchernarus\addons\dayz_server.pbo
       
      Вписывание строчки:
      call compile preprocessFileLineNumbers "\z\addons\dayz_server\DZAI\init\dzai_initserver.sqf"; Активирует мод, но боты не спаунятся.  
      Строки:
      if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n Даже похожей нет.
       
      Кто знает, что нужно делать теперь, подскажите пожалуйста.
      Уже неделю в гугле живу....
       
    • By Муха0в0Кедах
      Добрый день ВСЕ!!! Подскажите где можно найти миссии для этого мода и как поставить? благодарность гарантирую $
    • By Муха0в0Кедах
      Хеликраш нет на сервере вообще, подскажите как можно включить или что надо сделать чтобы они появились, спасибо заранее за помощь.
    • By Муха0в0Кедах
      Подскажите возможно включить постройку баз в этом моде 1.8.7 или нет? если да, то как и где.
    • By volchara
      Здравствуйте уважаемые гуру!!! Прошу у вас помощи в исправлении бага! Суть бага в том что, когда игрок вплотную подъезжает к базе(к одной из стены) и нажимает выйти из машины то игрок оказывается внутри базы... Как исправить это? Была идея убрать экшн скролл на выход из машины рядом с забором, но я не могу найти этот сам экшн в моде... Помогите плиз
  • Our picks

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.