Player corpse falls from destroyed vehicle script

Created by Serveratze


Step 1

Copy the Folder custom to you Exile.YourMap Folder


Step 2

in the Config.cpp in the ection CfgInteractionMenus you Modify:

class Car 
{
	targetType = 2;
	target = "Car";

	class Actions 
	{
		class ScanLock: ExileAbstractAction
		{
			title = "Scan Lock";
			condition = "('Exile_Item_ThermalScannerPro' in (magazines player)) && !ExilePlayerInSafezone && ((locked ExileClientInteractionObject) != 1)";
			action = "_this call ExileClient_object_lock_scan";
		};

		// Locks a vehicle
		class Lock: ExileAbstractAction
		{
			title = "Lock";
			condition = "((locked ExileClientInteractionObject) isEqualTo 0) && ((locked ExileClientInteractionObject) != 1)";
			action = "true spawn ExileClient_object_lock_toggle";
		};

		// Unlocks a vehicle
		class Unlock: ExileAbstractAction
		{
			title = "Unlock";
			condition = "((locked ExileClientInteractionObject) isEqualTo 2) && ((locked ExileClientInteractionObject) != 1)";
			action = "false spawn ExileClient_object_lock_toggle";
		};

		// Repairs a vehicle to 100%. Requires Duckttape
		class Repair: ExileAbstractAction
		{
			title = "Repair";
			condition = "true";
			action = "['RepairVehicle', _this select 0] call ExileClient_action_execute";
		};			
		
		// Hot-wires a vehicle
		class Hotwire: ExileAbstractAction
		{
			title = "Hotwire";
			condition = "((locked ExileClientInteractionObject) isEqualTo 2) && ((locked ExileClientInteractionObject) != 1)";
			action = "['HotwireVehicle', _this select 0] call ExileClient_action_execute";
		};

		// Flips a vehicle so the player doesnt have to call an admin
		// Check if vector up is fucked
		class Flip: ExileAbstractAction
		{
			title = "Flip";
			condition = "call ExileClient_object_vehicle_interaction_show";
			action = "_this call ExileClient_object_vehicle_flip";
		};

		// Fills fuel from a can into a car
		class Refuel: ExileAbstractAction
		{
			title = "Refuel";
			condition = "call ExileClient_object_vehicle_interaction_show";
			action = "_this call ExileClient_object_vehicle_refuel";
		};

		// Drains fuel from a car into an empty jerry can
		class DrainFuel: ExileAbstractAction
		{
			title = "Drain Fuel";
			condition = "call ExileClient_object_vehicle_interaction_show";
			action = "_this call ExileClient_object_vehicle_drain";
		};
	};
};

Change it to:

class Car 
{
	targetType = 2;
	target = "Car";

	class Actions 
	{
		class ScanLock: ExileAbstractAction
		{
			title = "Scan Lock";
			condition = "('Exile_Item_ThermalScannerPro' in (magazines player)) && !ExilePlayerInSafezone && ((locked ExileClientInteractionObject) != 1)";
			action = "_this call ExileClient_object_lock_scan";
		};

		// Locks a vehicle
		class Lock: ExileAbstractAction
		{
			title = "Lock";
			condition = "((locked ExileClientInteractionObject) isEqualTo 0) && ((locked ExileClientInteractionObject) != 1)";
			action = "true spawn ExileClient_object_lock_toggle";
		};

		// Unlocks a vehicle
		class Unlock: ExileAbstractAction
		{
			title = "Unlock";
			condition = "((locked ExileClientInteractionObject) isEqualTo 2) && ((locked ExileClientInteractionObject) != 1)";
			action = "false spawn ExileClient_object_lock_toggle";
		};

		// Repairs a vehicle to 100%. Requires Duckttape
		class Repair: ExileAbstractAction
		{
			title = "Repair";
			condition = "true";
			action = "['RepairVehicle', _this select 0] call ExileClient_action_execute";
		};
		
        // Salvage a vehicle
        class Salvage: ExileAbstractAction
        {
            title = "Salvage Vehicle";
            condition = "(!(alive (ExileClientInteractionObject)))";
            action = "_this call SV_fnc_SalvageVehicle";
        };			
		
		// Hot-wires a vehicle
		class Hotwire: ExileAbstractAction
		{
			title = "Hotwire";
			condition = "((locked ExileClientInteractionObject) isEqualTo 2) && ((locked ExileClientInteractionObject) != 1)";
			action = "['HotwireVehicle', _this select 0] call ExileClient_action_execute";
		};

		// Flips a vehicle so the player doesnt have to call an admin
		// Check if vector up is fucked
		class Flip: ExileAbstractAction
		{
			title = "Flip";
			condition = "call ExileClient_object_vehicle_interaction_show";
			action = "_this call ExileClient_object_vehicle_flip";
		};

		// Fills fuel from a can into a car
		class Refuel: ExileAbstractAction
		{
			title = "Refuel";
			condition = "call ExileClient_object_vehicle_interaction_show";
			action = "_this call ExileClient_object_vehicle_refuel";
		};

		// Drains fuel from a car into an empty jerry can
		class DrainFuel: ExileAbstractAction
		{
			title = "Drain Fuel";
			condition = "call ExileClient_object_vehicle_interaction_show";
			action = "_this call ExileClient_object_vehicle_drain";
		};
	};
};	

Step 3

Copy this code in your initPlayerLocal.sqf

SV_fnc_SalvageVehicle = compileFinal preprocessFileLineNumbers "custom\SalvageVehicle\SalvageVehicle.sqf";


Have Fun with this Modification :)