Jump to content

[DELETED] Simple Deploy Bike out of Toolbox (1.0.6+)


Relentless

Recommended Posts

no i don´t use the rightclick option. I use this custom menu ,  and when in implement  your script i can deploy a bike 

without having a toolbox.

The menu was changed from the look, and now I would try to adapt the menu for the epoch 1.0.6.1

I have this custom menu on my Epoch 1.0.5.1 Server, and when i try to deploy a bike without a toolbox i get the message

that i need a toolbox.

sry for my bad english

 

Link to comment
Share on other sites

@DAmNRelentless @Kimarik

maybe add this lines iin red?

Spoiler

//SimpleDeployBike
//By Relentless

///////////////////////////////REMOVE BELOW IF URE USING EXTRA_RC.hpp///////////////////////
private ["_inventory","_hastools"];
_inventory = items player;
_hastools = "ItemToolbox" in _inventory;

if (!_hastools) exitWith {cutText [format["Toolbox Needed."], "PLAIN DOWN"];};

///////////////////////////////REMOVE ABOVE IF URE USING EXTRA_RC.hpp///////////////////////

if (false) then {
  cutText [format["You can't place your bike while you're in combat."], "PLAIN DOWN"];
} else {
  player removeAction s_player_deploybike2;
  player playActionNow "Medic";
  r_interrupt = false;
  player removeWeapon "ItemToolbox";
 
  _dis = 10;
  _sfx = "repair";
 
  [player, _sfx, 0, false, _dis] call dayz_zombieSpeak;
  [player, _dis, true, (getPosATL player)] spawn player_alertZombies;
 
  sleep 6;
 
  _object = "Old_bike_TK_INS_EP1" createVehicle (position player);
  _object setVariable ["ObjectID", "1", true];
  _object setVariable ["ObjectUID", "1", true];
 
  player reveal _object;
  cutText [format["You constructed a bike out of your toolbox."], "PLAIN DOWN"];
 
  r_interrupt = false;
  player switchMove "";
  player playActionNow "stop";
 
  sleep 10;
 
  cutText [format["WARNING: This bike won't be saved during server restart!"], "PLAIN DOWN"];
};

 

Link to comment
Share on other sites

11 hours ago, ThatFellaNick said:

Hi,

Very clean script

I made a pull request on Git because players are able to spam 1,000 bikes by spamming the shit out of the button

;)

Thanks for that buddy. I am still learning and I aprecciate your pull request. I merged it already. Thank you! :)

Link to comment
Share on other sites

Dude stop spamming! Spamming doesn't give you any effort and we will not help quicker just because you write a lot in this thread.

So when you follow all the instructions there shouldn't be a problem with the bike killing players. The important part is the variables.sqf as @juandayz already said. You have to add your bike to the safeVehicle-Array. Keep in mind that there has to be another class name if you changed the bike in my script. So I gave the example of a old_bike so you have to add old_bike to the variables.sqf array and if you choose for example civil_bike you would have to add this to the array. Some logical thinking please.

Also make sure you have a custom variables.sqf. There is no effect if you move a variables.sqf to your mission and don't even call it. Go to your init.sqf and make sure the path of the variables.sqf points to your mission.

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 months later...

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
  • Advertisement
  • Discord

×
×
  • Create New...