//	Use "ForceRequiredAddOn(Support_Interactive_Vehicle);" in your script.

datablock WheeledVehicleData(YourVehicle)
{
	//o------------------------------o
	//| Standard Vehicle Definitions |
	//o------------------------------o

	//- Interactive Definitions -
	isInteractive = true;
	iNumZones = 2;
	iZone[0] = "-5 -0.5 0.2 -1.4 1.2 2.5";
	iZoneScript[0] = "onLeftDoor";
	iZone[1] = "1.4 -0.5 0.2 5 1.2 2.5";
	iZoneScript[1] = "onRightDoor";
};

function YourVehicle::onLeftDoor(%this, %obj, %client, %offset, %position, %vector)
{
	%time = getSimTime();
	if((%time - %obj.leftDoorTime) > 1300)
	{
		%obj.leftDoorTime = %time;
		%obj.leftDoor = !%obj.leftDoor;
		%obj.playThread(0, %obj.leftDoor ? ldOpen : ldClose);
	}

	//- The returning of 0 would permit the activation of the vehicle (normally applying force to it). -
	return 1;
}

function YourVehicle::onRightDoor(%this, %obj, %client, %offset, %position, %vector)
{
	%time = getSimTime();
	if((%time - %obj.rightDoorTime) > 1300)
	{
		%obj.rightDoorTime = %time;
		%obj.rightDoor = !%obj.rightDoor;
		%obj.playThread(1, %obj.rightDoor ? rdOpen : rdClose);
	}
	return 1;
}
