[Lua Question] Vehicle Spawning versus Entering Distinguishing

Hey I’m wondering if someone may know how to distinguish in lua the difference between whether or not a vehicle has been spawned (such as by a menu) versus if it has been entered via the door or other means like being sat into vehicle.

As I’m trying to make a script that has only certain zones for vehicle spawning. Thus if spawned anywhere outside of the zone then it will not allow a vehicle to be spawned and it will delete it/display a message.

The problem being what happens if someone steals a car or is seated into one etc will it yeet their vehicle as well if it cannot tell the difference. Just not sure how to code that. Thanks guys!