Austin

Pack Bike Script

21 posts in this topic

Every since the release of deploy bike I always thought it was necessary to have a pack bike option that way bikes are cleaned up by players and players have the option to remove/add them again so they aren't left everywhere which in turn clutters the map until a restart. The below script was developed from an old arma 2 script so I don't take credit for creating the script, Only thing I claim is the edits to make it work with exile. This script adds a pack bike option to all bikes on the map. Hope you enjoy!

P.S. Thanks GR8 for a hint in the right direction!

In Config.cpp search for "class Bikes" should look like the following below

	class Bikes
	{
		targetType = 2;
		target = "Bicycle";

		class Actions
		{
			class Flip: ExileAbstractAction
			{
				title = "Flip";
				condition = "true";
				action = "_this call ExileClient_object_vehicle_flip";
			};
		};
	};

Now we need to change that too

	class Bikes
	{
		targetType = 2;
		target = "Bicycle";

		class Actions
		{
			class Flip: ExileAbstractAction
			{
				title = "Flip";
				condition = "true";
				action = "_this call ExileClient_object_vehicle_flip";
			};
			class Pack: ExileAbstractAction
			{
				title = "Pack Bike";
				condition = "true";
				action = "execVM 'Scripts\Bike\Pack_bike.sqf';";
			};
		};
	};

Then we need to make a Pack_Bike.sqf and put the following below into that file.

if !((vehicle player) isEqualTo player) exitWith {}; //MAKE SURE WE ARE ON FEET

if (typeOf cursorTarget == "Exile_Bike_MountainBike") then {
    deletevehicle cursorTarget;
    player playMove "AinvPknlMstpSnonWnonDr_medic3";
    player linkItem "ItemRadio";
	uiSleep 1;
    ["Success",["Personal Bike packed! Radio added!"]] call ExileClient_gui_notification_event_addNotification;
};

Remember to change "Scripts\Bike\Pack_bike.sqf" to wherever you have put the file in order to have this working. If anyone has questions please comment below (don't message me!!!) that way others that might have the same question can get the answer too.

 

Battleye Filters:

Add  !"Exile_Bike_MountainBike" to your deletevehicle.txt on the first line.

Edited by Austin
1 person likes this

Share this post


Link to post
Share on other sites

i get the option to pack a bike but when i click on it nothing happens, 

also which deploy bike script are you using ? 

Share this post


Link to post
Share on other sites
Advertisement
7 hours ago, blaez said:

i get the option to pack a bike but when i click on it nothing happens, 

also which deploy bike script are you using ? 

This will work with any other scripts, it adds the option to click pack while looking at a exile bike. So in turn it should work whether or not you have a deploy bike script. Can you post a rpt and what you have in your config.cpp atm?

Share this post


Link to post
Share on other sites

Hey i have tested your script but there is one problem, you can delete almost every vehicle that is in your cursor target.

I like this script very mutch. i hope there is a fix for this . 

Greetz Trill

Share this post


Link to post
Share on other sites

Hi, i added this script but wen i pack the bike i get kicked script deletevehicle #0 2:1878 Exile_Bike_MountainBike any idea?

Tried to add !="Exile_Bike_MountainBike" but did not work.

Thanks

Share this post


Link to post
Share on other sites
1 hour ago, MedeirosPT said:

Hi, i added this script but wen i pack the bike i get kicked script deletevehicle #0 2:1878 Exile_Bike_MountainBike any idea?

Tried to add !"Exile_Bike_MountainBike" but did not work.

Thanks

Just add !"Exile_Bike_MountainBike" to deletevehicle.txt in your battleye filters.

Edited by Austin

Share this post


Link to post
Share on other sites
41 minutes ago, Austin said:

Just add !="Exile_Bike_MountainBike" to deletevehicle.txt in your battleye filters.

I have tried before and didn't work, will remove it for now.

Thanks

Share this post


Link to post
Share on other sites
13 minutes ago, MedeirosPT said:

I have tried before and didn't work, will remove it for now.

Thanks

sorry I mean't  !"Exile_Bike_MountainBike" gotta do it without the =

Share this post


Link to post
Share on other sites
13 hours ago, Austin said:

sorry I mean't  !"Exile_Bike_MountainBike" gotta do it without the =

Worked great, it was the = removed like you said and bang.

Thanks 

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.