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 serversDon'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
-
Our picks
Доброго времени суток!
Нашёл сервер, на котором можно минировать машину.
сам скрипт:
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" нужно описать на стороне сервера. Подскажите, пожалуйста, как сделать, чтобы скрипт заработал. Или, может быть, есть на примере этого другой скрипт?
Share this post
Link to post
Share on other sites