Removing all vehicles

I tried to make a function to remove the vehicle spawned when a player dies, but i failed, the plugin removes all the vehicles instead of removing only the vehicle spawned for that player :C

I did this


 function remove_karts( ply, kart )
	 ply:GetDrivingEntity( kart )
	 if ( ply:IsAlive(false) ) then
		kart:Remove()
	 end
end

What i have is when a player spawns it drops a vehicle in front of him, what i need is the vehicle to dissapear when he dies, so he gets a new one when he spawns again, so the map don’t get spammed with vehicles but my fucntion removes all of them

There are no parameters for player:Alive(). Do



function remove_karts( ply, kart)
         ply:GetDrivingEntity( kart )
         if not ply:Alive() then
                  kart:Remove()
         end
end