Vehicle lock system for spawned vehicles

Hello i am using ESX but have a script that allows police to spawn in vehicles i have looked for a vehicle lock system but the ones i have found are all dependent on the owned Vehicles database and as the spawned vehicles do not appear in this database the lock script will not work. If anyone knows a way to allow spawned vehicles to be locked it would be very helpful thank you.