How do I add cars that you can buy but when they switch from that specific job to another, it deletes the car?

In my server, I want to create a cop car that can be bought in the entities section of the F4 Menu, but I want to make it so that when people switch jobs from the CP Job, the car disappears.
Any Suggestions on what to do?

Keep a list/table somewhere of which cars were made by which players. Then in the “player switched job” hook (I assume there is one), delete all the cars made by that player.