Sign in to follow this  
Hotfix

Remove hotwire function on specified vehicle

2 posts in this topic

Hello,

I'm currently creating a mod for my server. I have managed to make everything work as intended, except for the fact that a vehicle I have placed with the editor can be hotwired. 

Any ideas on how I can make hotwire work on all vehicles, except O_Truck_03_ammo_F?

 

Was thinking about if I could add the into the config.cpp in some way? From this:

Spoiler

//Original
class Hotwire: ExileAbstractAction
			{
				title = "Hotwire";
				condition = "((locked ExileClientInteractionObject) isEqualTo 2) && ((locked ExileClientInteractionObject) != 1)";
				action = "['HotwireVehicle', _this select 0] call ExileClient_action_execute";
			};

 

To something like this:

Spoiler

//Suggestion
class Hotwire: ExileAbstractAction
            {
                title = "Hotwire";
                condition = "((locked ExileClientInteractionObject) isEqualTo 2) && ((locked ExileClientInteractionObject) != 1) && ((O_Truck_03_ammo_F) !=1)";
                action = "['HotwireVehicle', _this select 0] call ExileClient_action_execute";
            };

 

 

My Vehicle class:

Spoiler

class Item13
		{
			dataType="Object";
			class PositionInfo
			{
				position[]={7471.7749,191.27345,17578.875};
				angles[]={0,1.700038,0.0026529003};
			};
			side="Empty";
			class Attributes
			{
				lock="LOCKED";
				fuel=0;
				init="this allowDamage false;";
				name="Ammotruck";
			};
			id=302;
			type="O_Truck_03_ammo_F";
			class CustomAttributes
			{
				class Attribute0
				{
					property="ammoBox";
					expression="[_this,_value] call bis_fnc_initAmmoBox;";
					class Value
					{
						class data
						{
							class type
							{
								type[]=
								{
									"STRING"
								};
							};
							value="[[[[],[]],[[],[]],[[],[]],[[],[]]],true]";
						};
					};
				};
				class Attribute1
				{
					property="enableSimulation";
					expression="if !(is3DEN) then {_this enablesimulation _value;};";
					class Value
					{
						class data
						{
							class type
							{
								type[]=
								{
									"BOOL"
								};
							};
							value=0;
						};
					};
				};
				nAttributes=2;
			};
		};

 

Any ideas?

Edited by Hotfix

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

  • Recently Browsing   0 members

    No registered users viewing this page.