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
Sign in to follow this  
z1p

Скрипт минирования ммашины. Нужна помощь.

Доброго времени суток!

Нашёл сервер, на котором можно минировать машину.

 

сам скрипт:

 

 

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

5 answers to this question

Recommended Posts

  • 0

Так сыылку на гайд дай и усё, разбеёмся. Или ты папку миссии спёр? :D

Share this post


Link to post
Share on other sites



  • 0

ну эту переменную надо занести в BE, чтобы за нее не кикало

Share this post


Link to post
Share on other sites
  • 0

ItemCarBomb разве такой item существует в Epoch ?

Нет, есть аддон на нее

Share this post


Link to post
Share on other sites
  • 0

Ну вот и вся проблема почему не работал скрипт у z1p 
У него просто не было данного предмета в инвентаре

Edited by Dimitri (see edit history)

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
Sign in to follow this  

×
×
  • 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.