Under Illinois Law 720 Ilcs 5/24-1.2
A person commits aggravated discharge of a firearm when he or she knowingly or intentionally discharges a firearm at or into a building he or she knows or reasonably should know to be occupied and the firearm is discharged from a place or position outside that building or discharges a firearm in the direction of another person or in the direction of a vehicle he or she knows or reasonably should know to be occupied by a person. a violation of those offenses is a Class 1 Felony punishable by 4 to 15 years in the State penitentiary and a fine up to $25,000.
If the offense is committed in a school, on the real property comprising a school, within 1,000 feet of the real property comprising a school, at a school related activity or on or within 1,000 feet of any conveyance owned, leased, or contracted by a school to transport students to or from school or a school related activity, regardless of the time of day or time of year that the offense was committed is a Class X Felony punishable by 6 to 30 years in a State penitentiary and a fine up to $25,000.
A person can also commit aggravated discharge of a firearm when he or she knowingly or intentionally
- Discharges a firearm in the direction of a person he or she knows to be a peace officer, a community policing volunteer, a correctional institution employee, or a fireman while the officer, volunteer, employee or fireman is engaged in the execution of any of his or her official duties, or to prevent the officer, volunteer, employee or fireman from performing his or her official duties, or in retaliation for the officer, volunteer, employee or fireman performing his or her official duties.
- Discharges a firearm in the direction of a vehicle he or she knows to be occupied by a peace officer, a person summoned or directed by a peace officer, a correctional institution employee or a fireman while the officer, employee or fireman is engaged in the execution of any of his or her official duties, or to prevent the officer, employee or fireman from performing his or her official duties, or in retaliation for the officer, employee or fireman performing his or her official duties.
- Discharges a firearm in the direction of a person, or the direction of a vehicle he knows to be occupied by a person, he or she knows to be an emergency medical technician, ambulance, emergency medical technician intermediate, paramedic, ambulance driver, or other medical assistance or first aid personnel, employed by a municipality or other governmental unit, while that person is engaged in the execution of any of his or her official duties, or to prevent that person from performing his or her official duties.
- Discharges a firearm in the direction of a person he or she knows to be a teacher or other person employed in any school and the teacher or other employee is upon the grounds of a school or grounds adjacent to a school, or is in any part of a building used for school purposes.
- Discharges a firearm in the direction of a person he or she knows to be an emergency management worker while the emergency management worker is engaged in the execution of any of his or her official duties, or to prevent the emergency management worker from performing his or her official duties, or in retaliation for the emergency management worker performing his or her official duties.
- Discharges a firearm in the direction of a vehicle he or she knows to be occupied by an emergency management worker while the emergency management worker is engaged in the execution of any of his or her official duties, or to prevent the emergency management worker from performing his or her official duties, or in retaliation for the emergency management worker performing his or her official duties.
A violation of these laws is a Class X felony for which the sentence shall be a term of imprisonment of no less than 10 years and not more than 45 years.