here is the code pertaining to school grounds. Full code here:
https://www.ncga.state.nc.us/gascripts/statutes/statutelookup.pl?statute=14-269.2
(k) The provisions of this section shall not apply to a person who has a concealed handgun permit that is valid under Article 54B of this Chapter, or who is exempt from obtaining a permit pursuant to that Article, if any of the following conditions are met:
(1) The person has a handgun in a closed compartment or container within the person's locked vehicle or in a locked container securely affixed to the person's vehicle and only unlocks the vehicle to enter or exit the vehicle while the firearm remains in the closed compartment at all times and immediately locks the vehicle following the entrance or exit.
(2) The person has a handgun concealed on the person and the person remains in the locked vehicle and only unlocks the vehicle to allow the entrance or exit of another person.
(3) The person is within a locked vehicle and removes the handgun from concealment only for the amount of time reasonably necessary to do either of the following:
a. Move the handgun from concealment on the person to a closed compartment or container within the vehicle.
b. Move the handgun from within a closed compartment or container within the vehicle to concealment on the person.
EDIT:
Also here is the code that permits you to use said weapon should the need arise
(l) It is an affirmative defense to a prosecution under subsection (b) or (f) of this section that the person was authorized to have a concealed handgun in a locked vehicle pursuant to subsection (k) of this section and removed the handgun from the vehicle only in response to a threatening situation in which deadly force was justified pursuant to G.S. 14-51.3. (1971, c. 241, ss. 1, 2; c. 1224; 1991, c. 622, s. 1; 1993, c. 539, s. 164; c. 558, s. 1; 1994, Ex. Sess., c. 14, s. 4(a), (b); 1995, c. 49, s. 1; 1997-238, s. 2; 1999-211, s. 1; 1999-257, s. 3, 3.1; 2003-217, s. 1; 2004-198, ss. 1, 2, 3; 2006-264, s. 31; 2007-427, s. 6; 2007-511, s. 12; 2011-268, s. 4; 2013-360, ss. 8.45(a), (b); 2013-369, s. 2; 2014-119, s. 9(a); 2015-195, ss. 2, 3.)