Нужна помощь?
Создайте тему в соответствующем разделе
Не нужно писать всё в чат!Загляните на торговую площадку
Там вы можете купить
всё что касается игровых серверовНе хотите бан?
Пожалуйста, ознакомьтесь с нашими правилами
Не нарушайте порядок!Продаёте или покупаете?
Пользуйтесь услугами гаранта
Мы сделаем вашу сделку безопасной
- 0
-
Наш выбор
-
Создаем свой серверный мод. [DayZ 1.4 to Discontined]
123new опубликовал тему в Версия 1.0 и выше,
-
Увеличение карты х2
vitacite опубликовал тему в Картостроение,
Доброго времени суток!
Нашёл сервер, на котором можно минировать машину.
сам скрипт:
private["_theBomb","_vehicle","_curFuel","_newFuel","_timeLeft","_hasToolbox","_hasCarBomb","_dis","_sfx","_alreadyBombed"];
_vehicle = _this select 3;
_hasToolbox = "ItemToolbox" in items player;
_hasCarBomb = "ItemCarBomb" in magazines player;
_alreadyBombed = _vehicle getVariable["hasBomb",false];
if(!_hasToolbox) exitWith {
cutText ["\n\nYou need a Toolbox and to attach the Bomb to this Vehicle", "PLAIN DOWN"];
};
if(!_hasCarBomb) exitWith {
cutText ["\n\nYou dont have a Bomb in your Inventory", "PLAIN DOWN"];
};
player removeAction s_player_attach_bomb;
s_player_attach_bomb = -1;
player removeMagazine "ItemCarBomb";
player playActionNow "Medic";
sleep 1;
if(!_alreadyBombed) then {
PVOZ_CarBomb = [_vehicle];
publicVariableServer "PVOZ_CarBomb";
};
cutText ["\n\nAttached Carbomb! Next Player who starts the Engine will blow up!", "PLAIN DOWN"];
в файле fn_selfActions.sqf
if ("ItemCarBomb" in magazines player) then {
if (((cursorTarget isKindOf "Car") || (cursorTarget isKindOf "Air") || (cursorTarget isKindOf "Motorcycle"))) then {
if (s_player_attach_bomb < 0) then {
s_player_attach_bomb = player addAction ["Attach Carbomb", "actions\player_attach_bomb.sqf",cursorTarget, 3, true, true, "", ""];
};
} else {
player removeAction s_player_attach_bomb;
s_player_attach_bomb = -1;
};
} else {
player removeAction s_player_attach_bomb;
s_player_attach_bomb = -1;
};
Я так понимаю, что publicVariableServer "PVOZ_CarBomb" нужно описать на стороне сервера. Подскажите, пожалуйста, как сделать, чтобы скрипт заработал. Или, может быть, есть на примере этого другой скрипт?
Поделиться сообщением
Ссылка на сообщение
Поделиться на других сайтах